cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ShawnKeeneTF
Level: Powered On

Set Approval Time Formatting?

I've read several posts about formatting time in a flow but I'm still not able to figure it out.

 

I saw a function like this: convertTimeZone(utcnow(),'UTC','W. Europe Standard Time','dd/MM/yyyy HH:mm')

 

But, where do I enter this code? Can I use it directly inline in the Flow Editor's "Start an Approval" action?

 

My problem is that I start a flow when a user adds an item to a SharePoint list. The SharePoint site regional settings/time zone is set to Central Time, but the email notice about the approval (from the Flow) uses a different time format.  Here's an example:

 

1.pngI tried adding the Convert Timezone action block just before the "Start Approval" block, but how do I reference the converted time zone in the Approval block?  Or does anything need to change and i just keep the approval block as-is?

2.png
Or, should I remove the Convert Timezone block, and just wrap the begindate/enddate parts of the Approval Details in the function like this?

 

3.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Set Approval Time Formatting?

Hi @ShawnKeeneTF,

 

It seems that you would like to insert the convertTimeZone function into the email body.

Please just enter the code under the Expression tab.

I have made the following test to convert the time from UTC to Pacific standard time with the following code.

convertTimeZone(triggerBody()?['RiskEventDate'],'utc','pacific standard time','dd/MM/yyyy')

 Enter the code under Expression tab at the cursor position likes below:

1.PNG

Please feel free post back if you need more help.

 

Best regards,

Mabel

Community Support Team _ Mabel Mao
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

2 REPLIES 2
Community Support Team
Community Support Team

Re: Set Approval Time Formatting?

Hi @ShawnKeeneTF,

 

It seems that you would like to insert the convertTimeZone function into the email body.

Please just enter the code under the Expression tab.

I have made the following test to convert the time from UTC to Pacific standard time with the following code.

convertTimeZone(triggerBody()?['RiskEventDate'],'utc','pacific standard time','dd/MM/yyyy')

 Enter the code under Expression tab at the cursor position likes below:

1.PNG

Please feel free post back if you need more help.

 

Best regards,

Mabel

Community Support Team _ Mabel Mao
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
ShawnKeeneTF
Level: Powered On

Re: Set Approval Time Formatting?

Thanks!

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,377)