The formula below is returning "2024 10 30" but I am trying to have the formula return the last "calendar" day of the prior month based on today's date which I am expecting to be "2024 10 31". Can anyone tell me what I am doing wrong?
Datetimeformat(Datetimeadd(DatetimeTrim(Datetimenow(),"Lastofmonth"),-1,"Months"),"%Y %m %d")
Solved! Go to Solution.
You'll have to go to the previous month first and THEN convert to the last of the month (since different months have different ending days)
Datetimeformat(Datetimeadd(DatetimeTrim(Datetimenow(),"Lastofmonth"),-1,"Months"),"%Y %m %d") --> Datetimeformat(DatetimeTrim(DateTimeAdd(Datetimenow(),-1,"Months"),"Lastofmonth"),"%Y %m %d")
Ahhh so simple. Thank you!!!!
Happy to help!