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

formatDateTime and convertfromUTC in same expression

I'm still pretty new to the power platform and could use some help writing a complex expression for my specific scenario.

 

I have a scheduled flow that pulls from a SharePoint list to generate a report.  I have a "SLA" column that needs the date formatted and converted into Pacific Standard Time

 

RipCityNinja_1-1618934596305.png

 

The screenshot shows my current expression that works great with the formatting, but I can't figure out how to include the convertFromUtc into my expression.  I have tried to write it several ways with no luck.  Please help me get this to also display in Pacific Standard Time.

 

Thanks!

 

1 ACCEPTED SOLUTION

Accepted Solutions

@RipCityNinja 

It might be easier for you to use a convertTimeZone() expression rather than the action.  Substitute a convertTimeZone expression for your formatDateTime expression in your select action.  The expression will also allow you to format the date/time string.

Documentation on converTimeZone can be found here.

image.png

 

 

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

4 REPLIES 4
DamoBird365
Super User
Super User

Hi @RipCityNinja 

 

I've done a blog on dates here.

 

Are you looking for the action "convert time zone"?

 

DamoBird365_0-1618940108176.png

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cheers,
Damien


P.S. take a look at my new blog here

@DamoBird365 ,

 

Thank you for your response.  I looked over your post, which had fantastic information, but I'm still not connecting the dots.  I have tried to insert the Convert time zone action prior to my original post without success.  I have tried again and will share my results.

 

The source I am wishing to convert and format are part of my SharePoint list Date/Time column:

RipCityNinja_2-1618946269175.png

 

My flow is as follows:

RipCityNinja_0-1618946080486.png

RipCityNinja_1-1618946119675.png

 

The image below shows that the report is pulling the correct items as only 2 of them are in the future, however they still show in UTC which is 7 hours ahead of local time.

RipCityNinja_3-1618946408089.png

Should the Convert time zone action be moved within the flow?  I was hoping to add to my expression to avoid the extra API call, but I'll take whatever works at this point.  Any further advice would be much appreciated.

 

 

@RipCityNinja 

It might be easier for you to use a convertTimeZone() expression rather than the action.  Substitute a convertTimeZone expression for your formatDateTime expression in your select action.  The expression will also allow you to format the date/time string.

Documentation on converTimeZone can be found here.

image.png

 

 

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

Scott

@ScottShearer 

This did the trick!  I appreciate you sir!

 

@DamoBird365 

Thanks again for the additional documentation on formatting.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

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

Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022- Season 2 has kicked off!

Users online (4,017)