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

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

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 Kudoed Authors (Last 30 Days)
Users online (7,605)