Using AddDaysUTC Results In One Day Earlier?

2
Hi – I’ve seen posts about date calculations being one day earlier than expected, and I thought the fix to that was to use the “UTC” version of the date function? When I display the variable calculated below in a microflow, the result shows as 1/30/2020? I expected 1/31/2020 to show? Is there any way to fix this? If I change the last parameter from a -1 to 0, then I get 2/1/2020. addDaysUTC([%BeginOfCurrentMonthUTC%], -1)      
asked
4 answers
1

If you are showing the value calculated in the microflow in an entity with a datetime field, make sure that the field is set to localize no, then no localization that keeps the timezone into account is applied and I expect the field to display the date as desired.

answered
1

I found using this returns 1/31/2020, which is what I want. Weird that I had to add zero days?

addDaysUTC(trimToDaysUTC([%BeginOfCurrentMonthUTC%]), 0)

answered
0

Hi – I am not showing in an entity with a datetime field. I am just showing it as a calculated value via “CustomString” widget. I am also using in some date calculations in a microflow but not storing/showing in an entity per se. 

answered
0

Is there a way to truncate %BeginOfCurrentMonthUTC% to contain only the date portion? Maybe the time component is throwing things off

answered