Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi expert
I need to load the previous month in a loop. The starting month is defined as:
MonthStart(makedate(Year(today()),Month(today())-1)
It doesn't give me December 2022. Where is the error?
Thanks, Tom
Try
AddMonths(MonthStart(Today()),-1)
I guess the smallest change to get your expression to work would be:
MonthStart(makedate(Year(today()),Month(today()))-1)
but then again this seems to overcomplicate things.
One simpler version would be just
MonthStart(Today(),-1)