cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Converting time zones - Sharepoint List to Flow

Good day. 🙂 I have been struggling trying to figure out the right way to convert time zones for a flow. I have a SharePoint list for new hires for HR. HR staff adds a new hire with their respective start date (no time just MM/DD/YY). I then have a flow that populates an email with the new hire information. I have converted the time zone from UTC to my regional time zone (Eastern UTC -5) as described in MS instructions. However, when the time is converted it is off by a few hours and sends the email with the incorrect date.

 

The date also changes depending on when the HR staff submits the form. EDITED TO ADD: Sreenshot of SP list entry:

dateentered.PNG

 

Sometimes it makes it a day before or after. The time of the SharePoint site is set to my region as well.

 

What could be wrong? HR has stopped using the form as it is creating issues for our whole company. 😞 

 

Flow-Fail.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Converting time zones - Sharepoint List to Flow

Hi @Anonymous,

 

Please refer to screenshot below to create the flow:

Capture.PNG

 

The expression in the "Base Time" field as below:

addHours(triggerBody()?['StartDate'],5)

The flow would run successfully as below:

Capture.PNG

 

Best regards,

Alice

View solution in original post

5 REPLIES 5
Highlighted
Helper V
Helper V

Re: Converting time zones - Sharepoint List to Flow

@Anonymous

 

Try using a compose action like:

 

convertTimeZone(utcnow(),'UTC','W. Europe Standard Time','dd MMMM yyyy')
 
It worked for me in similar situatiion that you seem to have.
 
Regards,
 
Andrew
Highlighted
Anonymous
Not applicable

Re: Converting time zones - Sharepoint List to Flow

Thank you. Not there yet... That worked for the entry added in the morning hours (around 8 am EST) but not for the one added in the pm hours (around 5 pm EST). The email for the afternoon came out with the date after the correct state date. Math anyone? 😕 

TIA! Woman Happy

Highlighted
Community Support
Community Support

Re: Converting time zones - Sharepoint List to Flow

Hi @Anonymous,

 

Please refer to screenshot below to create the flow:

Capture.PNG

 

The expression in the "Base Time" field as below:

addHours(triggerBody()?['StartDate'],5)

The flow would run successfully as below:

Capture.PNG

 

Best regards,

Alice

View solution in original post

Highlighted
Anonymous
Not applicable

Re: Converting time zones - Sharepoint List to Flow

I think this may be the answer! I will run trials today to make sure but... Why would convert time zone work then? Inquiring minds would like to learn. 🙂 Thanks so much!
Highlighted
Community Support
Community Support

Re: Converting time zones - Sharepoint List to Flow

Hi @Anonymous,

 

Your local time (in sharepoint) is 5 hours later than the utc time (in flow), and flow would always use utc time, so whenever you get the time from sharepoint to flow, the time would always 5 hours later.

 

So you could add the time difference (5 hours) to the sharepoint time as me in the flow.

 

Best regards,

Alice

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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 (9,721)