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

Flow - Timezone conversion

Hello All,

I have the flowing flow below. The Get Items grabs list items from a SharePoint List.  One of the fields "Created_Actual" has a value like this: 7/1/2019 9:11 AM.  When that value ends up in the CSV file it is: 2019-07-01T14:11:04Z.  I have tried every formatdatetime, convertfromUTC, and Convert Time Zone (action) that Flow offers.  Nothing is actually converting the date/time to the right timezone. 

 

Success Criteria: I actually don't care what the format of the date time is in CSV, I just need it to be the "right" time (as it is in the SP list).  I think it has to do with timezone.  I have stayed up to 3AM too many nights and I need help.  Below the high level flow is what is in the Apply to each.  I am guessing I have the syntax wrong, or have something in the wrong order in the flow.  Please help.  Thank you in advance.

 

flow1.jpg

 

 

Note in the below, it says Eastern Standard Time, but I really need Central Time.

flow2.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Frequent Visitor

Re: Flow - Timezone conversion

Because there was so many of you guys that responded,  I wanted to update the group that I FINALLY figured out how to do what I need to do.  All of you guys helped lead me to the solution, and the specific problem was that it was because I was not creating the expression in the right way (the right place) in order to be able to use it in my Create CSV step.  For anyone struggling with the same issue (which is basically inexperience) the red rectangle on the right is where I needed to create the expression to be able to use it in the Create CSV step (red rectangle on the left).   Thanks again everyone.

 

 

Flow6.jpg

View solution in original post

11 REPLIES 11
Highlighted
Super User
Super User

Re: Flow - Timezone conversion

Hi @sdoscher, why don't you use the Convert time zone action? You can easily change any date to your local time zone and use the output of the action in, for example, an email as in the image below..

 

Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

 

ConvertTimeZone3.png

 

 

Highlighted
Dual Super User
Dual Super User

Re: Flow - Timezone conversion

Hey @sdoscher 

 

Flow currently takes all time in UTC zone. And you need to check the regional settings in SP to what time zone it has been set to. Based on that you can make the time zone settings at one place (either an action to convert time in Flow) or the time zone change in SP list. Here in this article I have mentioned it as a tip: https://powerusers.microsoft.com/t5/Microsoft-Flow-Community-Blog/10-MS-Flow-hacks-troubleshoots-wor... 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted
New Member

Re: Flow - Timezone conversion

Thanks you are really my hero...

Highlighted
Dual Super User
Dual Super User

Re: Flow - Timezone conversion

The 'Z' at the end of the timespan string in the CSV file denotes that the timespan is in UTC, but when that value is displayed in SharePoint it is being displayed in whatever timezone the site collection is using as a timezone.  You can find that setting in the site collection Regional settings.  So for example, if you personally are in Eastern time zone you'll normally see things displayed in the client in Eastern time.  But when accessing them programmatically from SharePoint they will load as Pacific time (that's where the North american servers are). If you export to CSV it will probably export as UTC, hence the 'Z'.  The trick is figuring out how you are getting the input time and how you are displaying the output.  Here's an article with some more explanation.

https://nicknow.net/microsoft-flow-dates-times-timezones-formatting/



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

Re: Flow - Timezone conversion

Thank you Rob.  I did try that action, before and again after your suggestion.  The problem I am having is that it does not produce an "output" (not sure if that is the right word) that I can use when building my CSV.  In other words, I don't see it in the Dynamic Content like you show in your flow.  I can't pick anything to use in my CSV file.  See scr shots below.  Any Ideas?  Note: Flow automatically put in an Apply to each (not sure why but maybe something there is causing it)?

 

Flow3.jpg

 

Flow4.jpg

 

 

 

Flow5.jpg

Highlighted
Frequent Visitor

Re: Flow - Timezone conversion

Hi yashag2255.

Thank you!

That information about the regional settings in SP was very helpful and does the trick, and I may take that path, BUT I really would like to be able to convert the timezone in Flow, since the functionality IS there and others are doing it.  It seems like at this point, I am missing something fundamental and I would like to know what that is, so I can learn.  See my post below...any ideas?

Highlighted
Frequent Visitor

Re: Flow - Timezone conversion

Hi @RobElliott . I just tagged you since I didn't know if you would get my reply below if I didn't.

Highlighted
Super User
Super User

Re: Flow - Timezone conversion

As you'll see from the image I posted the output from the Convert time zone is Converted time. That should be in your dynamic content box.

Rob
Los Gallardos

Highlighted
Frequent Visitor

Re: Flow - Timezone conversion

@RobElliott 

I  know...but it is NOT.  Why?  Very frustrating....does it have to do with the Apply to each.  I didn't put that there and I can't get rid of it.

Highlighted
Frequent Visitor

Re: Flow - Timezone conversion

Thank you @Pstork1 

Yes, I came across that article before I posted here and that is the exact code I used in my original post.  Can you tell from my original screenshots if I implemented it wrong or if it is in the wrong spot of the flow?

 

Highlighted
Frequent Visitor

Re: Flow - Timezone conversion

Because there was so many of you guys that responded,  I wanted to update the group that I FINALLY figured out how to do what I need to do.  All of you guys helped lead me to the solution, and the specific problem was that it was because I was not creating the expression in the right way (the right place) in order to be able to use it in my Create CSV step.  For anyone struggling with the same issue (which is basically inexperience) the red rectangle on the right is where I needed to create the expression to be able to use it in the Create CSV step (red rectangle on the left).   Thanks again everyone.

 

 

Flow6.jpg

View solution in original post

Helpful resources

Announcements
firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

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!

Top Solution Authors
Top Kudoed Authors
Users online (10,154)