I am running a formula in a workflow that I expect to trim to the first of the month.
DateTimeTrim([Metric Date],'month')
In a specific example where the metric date is "2022-08-31" I am getting different answers between server and desktop. Desktop is returning 2022-08-01 and server is returning 2022-09-01.
I have run multiple different iterations of this calculation
DateTimeTrim([Metric Date],'firstofmonth')
DateTimeAdd([Metric Date],-(DateTimeDay([Metric Date])-1),"days")
I have also tried saving new versions to server, ensuring the published version is the new version, running it, getting the wrong answer, downloading the same latest version out of gallery running it on desktop and then getting the right answer.
I am at a full conclusion that gallery is incorrect, in how it interprets this calculation. What is the fix? I need this workflow to run on a schedule, and be correct.