Hello ,
I have this requirement .
Iam trying to find the 'closing month' with this formula :
DateTimeFormat(DateTimeToday(),"%m") -1
and attach to the year to generate output : closing month + year .
for example : 092020 .
Untill now it is working , but when i run this solution in January 2021 for the closing month on December 2020 how does this work .
Any help .
Solved! Go to Solution.
Here is a formula using DateTime functions. Considers previous month then formats
DateTimeFormat(DateTimeAdd(DateTimeToday(),-1,"month"),"%m%Y")
Output:
Workflow:
Hope this helps 🙂
If this post helps you please mark it as solution. And give a like if you dont mind 😀👍
Hi ,
Thanks for the response .
Just wondering will this give the result across two different years .
For example : If iam running in Januaary 2021 , then will it show previous month as 122020.
Thanks
The DateTimeAdd function will work from year to year. I've marked the first solution so that others who have the same question can find an answer.
Cheers!
Esther