cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
khartunguark
Level: Powered On

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
Highlighted
khartunguark
Level: Powered On

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

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.
Highlighted
khartunguark
Level: Powered On

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
firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors
Users online (6,775)