Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I currently have the following in my load script:
let vMaxDate = num(makedate(2014,9,30));
How would you write this using the Today function so that vMaxDate is always the last day of the previous month?
MonthEnd(Addmonths(today(),-1))
and
floor(MonthEnd(Addmonths(today(),-1))) if you want only the date part (not 23:59:59)
MonthEnd(Addmonths(today(),-1))
and
floor(MonthEnd(Addmonths(today(),-1))) if you want only the date part (not 23:59:59)
monthend() function is the way to go:
let vMaxDate = monthend( Today() -1) ;
--> this will include a timestamp of 23:59 on the end
let vMaxDate = date(floor(monthend(Today()-1));
--> this will strip the timestamp and store only the date value