Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi i need some help to check the current month and then give to a variable a date.
if the month is the first 1 then the variable should go back 1 year , in the end of the 12th month
else point previus monthend.
if today is 2013-01-18 variable should give 2012-12-31
if today is 2013-02-01 variable should give 2013-01-31
Is it possible to do this on the scpirt , to compine if with let ?
if (Month(Today())=1, LET vYTDEndD_LY= MakeDate(Year(Today())-1,MonthEnd(Month(12))), LET vYTDEndD_LY= MakeDate(Year(Today())-1,MonthEnd(Today())-1))
thanks
Use this date(MonthEnd(AddMonths(today(),-1))) as <Fieldname>
This can also be used in any chart that you might be making
Hope this helps
Regards
Mhatim