Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
How to count no of days in a month?
I have a field Posting date and need to count no of days in a month based on posting date.
In current month, I need to have the count only till current day. For ex: Today is Sept 25, so it must be only 25 in case of posting date is in this month range.
I need to achieve this in load statement to sum the value of fields.
Thank you.
@KuppuswamyS try below
if([Posting Date] >=monthstart(today()),day(Today()), NoOfDaysExpression)
@KuppuswamyS you can use for example Interval, like :
=Interval(Date2-Date1 ,'D')
example :
Interval is a script and chart function, so you can use it in Load !
@KuppuswamyS If any dates is missing in your Data then do you still need to count it?
Hi Taoufiq and Kush,
I managed to get no of days in a month using expressions in pivot table.
I have posting date field and it has data. If posting date is in current month, I need to get only no of days(as of today) in this month. Can you please help me to get that logic.
Example : If posting date field data is Aug 2020, it is 31 days but if Sept 2020(Current month), today is 25th Sept, (as of today, no of days must be 25).
Thank you.
Thank you.
@KuppuswamyS can you share a sample data and the expected output ?
@KuppuswamyS try below
if([Posting Date] >=monthstart(today()),day(Today()), NoOfDaysExpression)
It works, Thank you Kush.