cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AB21
Post Patron
Post Patron

approval flow - time is an hour out

Hi all, 

 

I have a flow that uses approvals that is linked to a sharepoint list. 

 

Screenshot 2020-03-09 at 12.37.02 PM.png

 

 

the convert formula I use is 

convertTimeZone(utcnow(triggerBody()?['StartDate']),'UTC','W. Europe Standard Time','dd/MM/yyyy HH:mm')
 
This works but when the email is sent to the person it needs to be sent too, the time is one hour forward
Screenshot 2020-03-09 at 12.41.16 PM.pngScreenshot 2020-03-09 at 12.15.16 PM.png
 
 
Thanks in advance
 
15 REPLIES 15
Jcook
Super User III
Super User III

Hello,

Try using the date time action to convert time zone.

—Josh
If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others

Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





Sorry how do I do this? 

 

 

Hi @Jcook , 

 

Im pretty new to automate can you please explain on how I do this please? 

 

Thanks in advance,

 

 

 

Jcook
Super User III
Super User III

Hello @AB21 

Could you provide me with the date time that you are trying to convert?

 

I am asking for a sample date time to confirm my method will work.

 

Thanks

 

—Josh
If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others


Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





Hi @Jcook 

 

the date and time is coming from a sharepoint list. 

 

Screenshot 2020-03-17 at 4.42.03 PM.png

 

if the date and time is inputted like so in the approval email the time is a hour forward. The date is correct. 

 

Formula used:  convertTimeZone(utcnow(triggerBody()?['StartDate']),'UTC','W. Europe Standard Time','dd/MM/yyyy HH:mm')
 
Changing StartDate to EndDate for the end time/date

 

 

 

Jcook
Super User III
Super User III

Hello @AB21 

 

This is most likely due to Daylight savings time?

 

My suggestions would be to use a addHours() expression.

 

Example:

TImeZone Minus 1 hour.png

 

—Josh
If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others

 


Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





Hi @Jcook ,

 

Am I doing something wrong? 

 

I cant seem to get this to work I get an error, here is my flow:

 

Screenshot 2020-03-18 at 8.41.48 AM.png

 

 

Here is the error:

 

Screenshot 2020-03-18 at 8.41.53 AM.png

 

Thanks in advance 

 

 

 

Jcook
Super User III
Super User III

Hi @AB21 

 

So you are using my expression exactly.

 

Change your expression to:

 

addHours(outputs('Compose'),-1)

 

You were referencing my compose shape, as my shape was named Compose Start Date.

Yours is just Compose. So you only need to reference your shape's name

 

—Josh
If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others


Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





DanyElHoyek
Advocate III
Advocate III

Did you try to convert the Date / Time by using the action "Convert time zone" instead of using the expression formula?

Hi @DanyElHoyek 

 

How do I do this? 

Hi @Jcook 

 

This still hasn't worked! But thanks for your consistent help

 

Here is what comes from "when an Item is created"

 

Screenshot 2020-03-19 at 3.01.07 PM.png

 

 

 

From the compose triggers here is the screenshot:

 

Screenshot 2020-03-19 at 3.01.31 PM.png

 

 

Here is the approval email which still has the time one hour forward. 

 

Screenshot 2020-03-19 at 3.05.55 PM.png

 

Thanks in advance 

Jcook
Super User III
Super User III

Hi @AB21

 

Are you referencing the Output action in the approval email? I think you are passing the SharePoint date still.

 

Please send screenshot of your approval email body in flow.

 

Thanks

 

—Josh
If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others


Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





Hi @Jcook 

 

Screenshot 2020-03-19 at 3.13.57 PM.png

 

 

Thanks

Jcook
Super User III
Super User III

@AB21 

 

Can you try and use the Dynamic content of 'Compose 2' instead of your convertTimeZone expression.

 

The picture you posted earlier that had the right date/time from the Compose action. Reference that.

 

—Josh
If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others


Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





Hi @Jcook 

 

Thanks for this but still no luck! 

 

I have added the compose 2 for the date/time which brings up the following:

 

Screenshot 2020-03-25 at 9.41.15 AM.png

Screenshot 2020-03-25 at 9.41.58 AM.png

 

 

When these are the correct time and date: 

 

Screenshot 2020-03-25 at 9.44.20 AM.png(these are from the sharepoint list)

 

 

 

please help

 

 

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (46,415)