When reviewing last month’s services with a customer, I wanted to display the full month name on a slide. Obviously MMM would display “Dec” for December, but a complete month name? To save anyone else Googling, it’s MMMMM.
So the code below, asks “When did the last month start, when did the new month start, and therefore going back a day, when did the last month end ?” Then it writes out the month and year in the format I wanted “December 2024” for example.
[DateTime: =>ReportDate]
[DateTime: addMonths=-1, day=1, =>LastMonthStart]
[DateTime: day=1, =>LastMonthEnd]
[DateTime: value={LastMonthEnd}, AddDays=-1, =>MonthEnd]
[=: format(MonthEnd, 'yyyy')
, =>Year]
[=: format(MonthEnd, 'MMMMM')
, =>ReportMonth]
[: {ReportMonth} {Year}
, =>ReportMonth]
And here’s an example slide using the code: