Hi I need to add the date for last month the month and the year I usually do a manual and type in the month (12) and year (2023).
Solved! Go to Solution.
You can use these two formulas to get the Year and the Month for last year. You can combine the two into one formula box if you need to concatenate them in anyway. This is Dynamic, do if you are in February it should still return December of 2023 no matter which day you run the report this year. If you need it to only show you the prior month, you can remove this: "-DateTimeMonth(DateTimeNow())" and update it to "-1".
Year
Datetimeyear(DateTimeAdd(DateTimeNow(),-DateTimeMonth(DateTimeNow()),'month'))
Month
Datetimemonth(DateTimeAdd(DateTimeNow(),-DateTimeMonth(DateTimeNow()),'month'))