cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Frequent Visitor

Re: Flow Date/Time Formula

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
Highlighted
Community Support
Community Support

Re: Flow Date/Time Formula

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.
Frequent Visitor

Re: Flow Date/Time Formula

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (2,176)