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))