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

View solution in original post

@ScottShearer 

This did the trick!  I appreciate you sir!

 

@DamoBird365 

Thanks again for the additional documentation on formatting.

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!

Users online (2,469)