cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate V
Advocate V

How to format date/time values from a date column in a list

Hi All,

 

I have a FLOW that creates an outlook event, and sends a confirmation email to the creator of the event.

I added the start and end dates in the body of both the Event and Email, but the time is in UTC, where my date in my list is in EDT Eastern US.

 

How do i get FLOW to format the date properly when sending the alerts?  As you can see below, the alerts go out 4 hour in the future :)...

 

LeadDB_SendEmailAlert.jpg

 

This is the event showing the correct start and end time but the body is wrong.  I chose the same followupStart in both

LeadDB_OylookEventDatesBoth.jpg

 

 

 

This is from the Email alert

LeadDB_EmailDates.jpg

 

This is from the List

LeadDB_ListDates.jpg

This is from the Outlook event

LeadDB_OylookEventDates.jpg

TIA,

Joe

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Super User
Super User

Re: How to format date/time values from a date column in a list

I believe you want to use the Convert Time Zone action.  It will not only convert form UTC for you but will also allow you to format the data/time returned.

 

Here is link to a great explanation of how to use the Convert Time Zone action

 

Please post here and let everyone know if this solves your issue.

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
Community Support
Community Support

Re: How to format date/time values from a date column in a list

Hi @jaylou,

 

Do you want to convert the Start time and End time from your SharePoint list into your local time zone?

Could you please share a full screenshot of your flow's configuration?

 

I agree with @ScottShearer's thought almost, if you want to convert the Start time and End time (which are in UTC format) into your local time zone, I think the "Convert time zone" action could achieve your needs.

 

I have made a test on my side and please take a try with the following workaround:

  • Add a "When an item is created" trigger, specify Site Address and List Name.
  • Add a "Convert time zone" action, Base Time set to Follow-Up Start dynamic content of the trigger, Source time zone set to (UTC) Coordinated Universal Time, Destination time zone set to (UTC-08:00) Pacific Time (US & Canada).

Note: The Date time in my SharePoint list is in (UTC-08:00) Pacific Time (US & Canada), on your side, you should set the Destination time zone to EDT Eastern US (The time zone of your SharePoint list).

  • Add a "Convert time zone 2" action, Base Time set to Follow-Up End dynamic content of the trigger, Source time zone set to (UTC) Coordinated Universal Time, Destination time zone set to (UTC-08:00) Pacific Time (US & Canada).
  • Add a "Send an email" action, Body field set to following formula:13.JPG

     The corresponding value of Start Time set to output of the "Convert time zone" action, the corresponding value of End Time set to output of the "Convert time zone 2" action.

Note: The Date time in my SharePoint list as below:14.JPG

 

Image reference:15.JPG

 

 

The flow works successfully as below:

16.JPG

 

17.JPG

More details about the "Convert time zone" action, please check the following article:

https://flow.microsoft.com/en-us/blog/working-with-dates-and-times/

 

 

Best regards,

Kris

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

View solution in original post

4 REPLIES 4
Highlighted
Super User
Super User

Re: How to format date/time values from a date column in a list

I believe you want to use the Convert Time Zone action.  It will not only convert form UTC for you but will also allow you to format the data/time returned.

 

Here is link to a great explanation of how to use the Convert Time Zone action

 

Please post here and let everyone know if this solves your issue.

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
Community Support
Community Support

Re: How to format date/time values from a date column in a list

Hi @jaylou,

 

Do you want to convert the Start time and End time from your SharePoint list into your local time zone?

Could you please share a full screenshot of your flow's configuration?

 

I agree with @ScottShearer's thought almost, if you want to convert the Start time and End time (which are in UTC format) into your local time zone, I think the "Convert time zone" action could achieve your needs.

 

I have made a test on my side and please take a try with the following workaround:

  • Add a "When an item is created" trigger, specify Site Address and List Name.
  • Add a "Convert time zone" action, Base Time set to Follow-Up Start dynamic content of the trigger, Source time zone set to (UTC) Coordinated Universal Time, Destination time zone set to (UTC-08:00) Pacific Time (US & Canada).

Note: The Date time in my SharePoint list is in (UTC-08:00) Pacific Time (US & Canada), on your side, you should set the Destination time zone to EDT Eastern US (The time zone of your SharePoint list).

  • Add a "Convert time zone 2" action, Base Time set to Follow-Up End dynamic content of the trigger, Source time zone set to (UTC) Coordinated Universal Time, Destination time zone set to (UTC-08:00) Pacific Time (US & Canada).
  • Add a "Send an email" action, Body field set to following formula:13.JPG

     The corresponding value of Start Time set to output of the "Convert time zone" action, the corresponding value of End Time set to output of the "Convert time zone 2" action.

Note: The Date time in my SharePoint list as below:14.JPG

 

Image reference:15.JPG

 

 

The flow works successfully as below:

16.JPG

 

17.JPG

More details about the "Convert time zone" action, please check the following article:

https://flow.microsoft.com/en-us/blog/working-with-dates-and-times/

 

 

Best regards,

Kris

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

View solution in original post

Highlighted
Advocate V
Advocate V

Re: How to format date/time values from a date column in a list

Hi guys,

Thanks for the responses 🙂

 

As in the my images of my FLOW, I am still trying to understand why the event is scheduled correctly in my time zone, but the body of the event doesn't use the same time zone for the same date column from the list...

 

Why do we have to jump thru so many hoops to get FLOW to work properly?  wouldn't it make sense for FLOW to use the same timezone for all dates?  Especially within the same task?

 

The images didn't come in in order but I think got it all...

 

LeadDB_FLOWforKris.jpgLeadDB_FLOWforKris1.jpgLeadDB_FLOWforKris2.jpgLeadDB_FLOWforKris3.jpgLeadDB_FLOWforKris4.jpg

 

Thanks again,

Joe

Highlighted
Advocate V
Advocate V

Re: How to format date/time values from a date column in a list

Thanks both for the answer!! 

 

Shouldn't have to, but it works 🙂

 

Joe

Helpful resources

Announcements
firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new 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
Users online (10,181)