
Specialist
2023-01-12
08:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
MonthStart(makedate(Year(today()),Month(today())-1)
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
1,020 Views
2 Replies

.png)
Former Employee
2023-01-13
08:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try
AddMonths(MonthStart(Today()),-1)
989 Views


MVP
2023-01-13
04:15 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)
975 Views
