0

How to detect last date of the month in formate MM-dd for all 12 months dynamically.

HI all,

 

How to detect last date of the month in formate MM-dd for all 12 months dynamically.

 

lets say  01-31   02-28  etc

 

is there is any way ?  I know this works

DATEVALUE(DATE_ENDOF(today(),"3"),"dd")

I know this detects current month end date and if you substract -1 or add 1  it will give me next or previous month. but lets say i want to hardcode the month instead of reference ? 

 

 

 

 

thanks

hp

2 comments

  • 0
    Avatar
    Janice Janczyn

    Hi Hardik,

    I would use 

         DATE_ENDOF( DATE( CONCAT( DATE_UNITVALUE( TODAY(), year ), NUMBERFORMAT( CUMULATIVE( REPEAT(1,12) ) ) ), "yyyyM" ), month )

    Then on the Properties tab, the Input Format is Unix time (as seconds) and the Display Format is your choice.

    I hope this helps!

    Thanks,
              Janice

  • 0
    Avatar
    Hardik Pargi

    THanks Janice for the help.!!

Please sign in to leave a comment.