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

Flow not interpreting Date and Time fields correctly from a SharePoint list item

Preface: The issue I detail below began 3 days ago. My flow worked great until some new Power Automate updates were rolled out over the last week. Also, I am operating in an Office 365 GCC environment.

 

I have a leave request flow that is triggered by 'When an item is created or modified'. The flow generates a word document from a list item (created by a Nintex form submission), and then converts the .docx file it creates to .pdf with the 'Convert file (preview)' OneDrive connector. My list contains fields for 'StartDate' and 'EndDate' that are date and time fields. In SharePoint, the date and time fields are displayed accurately, meaning they reflect what the user enters into the list form correctly). However, when the PDF product is delivered by my flow to the users email, the times are 4 hours later than they should be. For example, if a user selects 4/30/2020 9:00 AM as the 'StartDate', it gets put into the PDF document as 4/30/2020 1:00 PM. In addition, when I review my recent flow runs, I am finding that all date and time fields in my flow jump ahead by 4 hours. 

 

Flow details from 'When an item is created or modified' triggerFlow details from 'When an item is created or modified' trigger

 

List items displaying the date and time correctlyList items displaying the date and time correctly

 

In the Flow screenshot above, Start and End times should be displaying 09:00:00Z and 17:00:00Z respectively. Also, the created and modified date fields are 4 hours ahead of where they should be. You can see in my SharePoint list that these columns display what the user entered correctly.

 

I have verified that my regional settings in both SharePoint and OneDrive are correct (US eastern time). Even the .docx file that the flow generates prior to the pdf conversion displays the date and time correctly (Flow updates quick part document properties used in my .docx template). I believe this is due to the file being created in a SharePoint library in the same site with the correct time zone applied. When OneDrive converts the file and I attach it to email in my flow, the user receives an email with the PDF attached, but the times are wrong in the PDF! 

 

Why would power automate all of a sudden jump my list times up by 4 hours? Is there a setting that I am missing? Anyone else experience this? I'd prefer to not have to subtract time from these fields within my flow. Seems like a silly work-around. 

 

Any help would be appreciated.

Thanks, from a long-time lurker, first time poster. 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Flow not interpreting Date and Time fields correctly from a SharePoint list item

@dfullerton 

I suspect that you have a time zone issue - SharePoint stores and interprets everything in UTC.  You can use the Convert time zone action or expressions to fix ot simply make the adjustment yourself.

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

4 REPLIES 4
Highlighted
Super User III
Super User III

Re: Flow not interpreting Date and Time fields correctly from a SharePoint list item

Hello @dfullerton 

 

Try using the Convert time zone action.

 

Flow natively uses UTC. So converting to your time zone will output the date as you want.





Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips, tricks, and guides
FlowAltDelete




Highlighted
Super User III
Super User III

Re: Flow not interpreting Date and Time fields correctly from a SharePoint list item

@dfullerton 

I suspect that you have a time zone issue - SharePoint stores and interprets everything in UTC.  You can use the Convert time zone action or expressions to fix ot simply make the adjustment yourself.

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

Highlighted
Frequent Visitor

Re: Flow not interpreting Date and Time fields correctly from a SharePoint list item

Thank you! It is working now. Strangely, this started happening out of the blue, so I didn't suspect that the native time zone for Power Automate could be the issue. Glad it worked as planned!

 

 

Highlighted
Super User III
Super User III

Re: Flow not interpreting Date and Time fields correctly from a SharePoint list item

@dfullerton 

I didn't mean to say that "Flow stores and interprets everything in UTC"  - I had intended to sat that SharePoint stores and interprets everything in UTC.  Sorry for the confusion and I updated my original post.

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

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.

Upcoming Events

Experience what’s next for Power Automate

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

Users online (7,292)