cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
khartunguark
Frequent Visitor

Flow Date/Time Formula

I'm creating a flow that creates a task when an email message is flagged. I would like to make a task due today. Currently, I have the utcNow() formula, but this make it due yesterday for some odd reason. 

1 ACCEPTED SOLUTION

Accepted Solutions

Ok. After I slept on it and looked at my workflow output in the flow history, that makes since, but your solution wouldn't work either. This is a date output, not a time and date output so it was reading today's date and time, outputting it as midnight on that day (because the date field doesn't have a time), and then subtracting off hours out of the output (because I'm 5 hours behind UTC) and coming up with yesterday's date. In that case, no matter what time I put on there, it's going to output yesterday's date so I'll actually have to do an add a day formula. That's a glitch and should probably be fixed. Even if they created a "today" formula, it would still carry this issue. 

 

So my formula (UTC now) produced this: 2017-09-26T20:00:45.8026886Z

And the output became: 2017-09-26T00:00:00

And then outlook subtracted 5 hours and came up with yesterdays date. 

View solution in original post

2 REPLIES 2
v-micsh-msft
Community Support
Community Support

Hi @khartunguark,

 

I susepct the issue should be mostly related with the time zone.

Generally UTCNow() function would generate the current time in UTC time zone, if you would like to convert into your own time zone, please take a try to take use of AddHours() function to revert the time changes.

Function reference:

WorkFlow definition Language

 

Regards,

Michael

 

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Ok. After I slept on it and looked at my workflow output in the flow history, that makes since, but your solution wouldn't work either. This is a date output, not a time and date output so it was reading today's date and time, outputting it as midnight on that day (because the date field doesn't have a time), and then subtracting off hours out of the output (because I'm 5 hours behind UTC) and coming up with yesterday's date. In that case, no matter what time I put on there, it's going to output yesterday's date so I'll actually have to do an add a day formula. That's a glitch and should probably be fixed. Even if they created a "today" formula, it would still carry this issue. 

 

So my formula (UTC now) produced this: 2017-09-26T20:00:45.8026886Z

And the output became: 2017-09-26T00:00:00

And then outlook subtracted 5 hours and came up with yesterdays date. 

View solution in original post

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (50,551)