TOSTRING(DATETIMEFORMAT(DATETIMENOW(),-1, "MONTHS","%B %Y"
I want to save a file that is produced on the first business day with the previous month appended to the end. So on June 1 the file should be saved as "Excel File May 2021". I'm getting a parse error so I've got something out of order here in my expression. Probably the -1, "months" in datetimeformat? It can't be difficult to do this but I still struggle with these kinds of expressions. Looking for suggestions. Thanks!
Solved! Go to Solution.
Hi @KateC
Try adding a datetimeadd to your formula, the below seems to return "May 2021"
TOSTRING(DATETIMEFORMAT(datetimeadd(DATETIMENOW(),-1, "MONTHS"),"%B %Y"))
That's exactly what I wanted. Thank you!