cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JeffC
Helper I
Helper I

Help with Time Conversion in Email.

Hello,

 

I built a flow that sends an email and in the email it has the time and date that is coming from a SharePoint list.  However, in the email the time is showing incorrectly and I have tried multiple ways to resolve this but can't.

 

The ConvertTimeZone conversion in my flow seems to be working properly (see below) but it isn't flowing through to the email correctly (UTC to EST)

 

JeffC_6-1655755330924.png

JeffC_2-1655754682083.png

 

I then create a variable to convert the time from an unfriendly view to more friendlier view.

 

Variables Below

 

JeffC_3-1655754833324.png

 

Then in the email I create a dynamic query based off of the varDate variable.

 

JeffC_4-1655754892000.png

formatDateTime(variables('varDate'),'f')
 
At this point, below is the time that shows up in the emai which is 7 hours behind which isn't UTC or eastern time (I am in EST)
 
Example Email
My name is XXX and I will be conducting your IT Orientation on Monday, June 20, 2022 4:22 PM. 
 
The time is actually 7 hours ahead of the time I have in my sharepoint list.
 
JeffC_5-1655755076284.png

 

So at this point  in the beginning of the flow the convertimezone is changing it time correctly by 4 hours.  However, when I try to modify the time in the email it shows 7 hours difference.

 

Any thoughts that anyone has would be greatly appreciated!

 

Jeff

 
 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-yujincui-msft
Community Support
Community Support

Hi @JeffC ,

 

I have made a simple test on my side. Maybe you could try as follows.

vyujincuimsft_0-1655877089338.png

vyujincuimsft_2-1655877401001.png

vyujincuimsft_3-1655877471271.png

Result Screenshot:

vyujincuimsft_4-1655877562469.png

 

In addition, maybe you could considering using the addHours() function.

addHours(items('Apply_to_each')?['ColumnName'],-8,'f')

vyujincuimsft_5-1655878116509.png

 

 

Best Regards,
Charlie Choi

View solution in original post

5 REPLIES 5
Jondoesflow
Helper IV
Helper IV

Hey Jeff,

 

Shouldn't the vardate, be set to the value of the output of the converted time zone ?

But the vardate value is set to the orientation date column in sharepoint.  If I remove it and add in the converted time into the value then what does the expression look like in the email?

 

Shouldn't you in that case, be doing the conversion of the date on the orientation date, not UTCNOW ?

v-yujincui-msft
Community Support
Community Support

Hi @JeffC ,

 

I have made a simple test on my side. Maybe you could try as follows.

vyujincuimsft_0-1655877089338.png

vyujincuimsft_2-1655877401001.png

vyujincuimsft_3-1655877471271.png

Result Screenshot:

vyujincuimsft_4-1655877562469.png

 

In addition, maybe you could considering using the addHours() function.

addHours(items('Apply_to_each')?['ColumnName'],-8,'f')

vyujincuimsft_5-1655878116509.png

 

 

Best Regards,
Charlie Choi

Thank you very much for your response.  I went at it a  little differently by inititizing a date/string variable, set a variable to the SharePoint column, created a compose with the date and time format I wanted, and then did a subtract from time.  

 

JeffC_0-1655909342345.png

 

 

Thank you again,

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (2,882)