cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Cavel
Regular Visitor

MS Flow adds incorrect date and time to Sharepoint List

Hi all,


I have a flow that takes an email and adds info and attachments from that email to a sharepoint list. One of the things the flow gets from the email is time received. Strangely the time posted to the sharepoint list is not the same as the time the email was received.

 

This is the flow below;

FLOW p1.PNGflow p2.PNG

When the flow runs the time is way off. For example i received and email at 1:34pm but in sharepoint the time is 12:4am.

 

And advice?

3 REPLIES 3
RookieI
Resolver I
Resolver I

This is the reason for the time zone, you can use Convert time zone action to convert the time zone.

Cavel
Regular Visitor


@RookieI wrote:

This is the reason for the time zone, you can use Convert time zone action to convert the time zone.


 

I updated the flow with a coverttimezone expression but it still gives the exact same time as though the expression wasn't there. (Tested with and without expression to confirm this)

 

convertTimeZone(triggerBody()?['DateTimeReceived'], 'UTC', 'SA Western Standard Time', 'hh:mm') was the expression i used

 

The funny thing is on checking the test - this is the result of the get email step - 

"DateTimeReceived": "2019-04-15T08:57:58+00:00"

Hi @Cavel ,

 

This is indeed the difference in the display results caused by time zone.

Please consider using addMinutes() function to eliminate the difference in time display.

 

From the data you provided (1:34pm/ 12:4am), the difference between the two is 90 minutes.

Please refer to the following Expression:

addMinutes(triggerBody()?['DateTimeReceived'],90)

Image reference:

13.PNG

If it is a few hours apart, you could use addHours() function.

Hope it helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (2,998)