Hi Community !
Need your help to figure out how to calculate 'Year of previous month'. I work on a report which is a 'snapshot' of previous month. While there's no issue with year (whether current month or previous) during Jan, I would be working on Dec data of 'last' year, so my formula needs to point to 2022 when I would be reporting on Jan'23 month.
something that must look like this: [Ddate Year] = ToNumber(DateTimeFormat(DateTimeToday()-30,"%Y"))
Thanks in advance !
Solved! Go to Solution.
Try this formula: DateTimeYear(DateTimeAdd([MyDate],-1,"months"))
Chris
Hey @MRPP You want something like,
datetimeyear(datetimeadd(DateTimeToday(), -1, 'month'))
This works !