cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Get Now Date Time

Hello 

 

 

I need help to set date and time when i run the flow it give always +2 hours for example if its 1 pm so it gives me 3 am 

any help???

 

 

Thanks

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: Get Now Date Time

Hi @Anonymous,

 

You can start with the following function. In this function, you add 2 hours to the utcNow(). Just remember the utcNow() date and time will vary based on your time zone.

addHours(utcNow(), +2)

Fausto Capellan, Jr


Did I answer your question? Mark my post as a solution! Did my response help? Please give it a thumbs up!

Proud to be a Flownaut!


View solution in original post

Highlighted
Community Support Team
Community Support Team

Re: Get Now Date Time

Hi @Anonymous,

 

The UTCNow() function currently could only return the time in UTC time zone, and Microsoft Flow as an Online service, currently could only work with time in UTC time zone.

If you would like it to display in local time zone, then please take use of the Addhours funciton to deal with the time lag.

For example, if your time zone is PST, then to display the time correctly, you would need to take use of expression as below for the UTCNow():

AddHours(UTCNow(),-8)

For how to take use of expression, check the blog below:

Use expressions in flow actions

Please refer to the Working with dates part.

Regards,

Michael

Community Support Team _ Michael Shao
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
Super User
Super User

Re: Get Now Date Time

Hi @Anonymous,

 

You can start with the following function. In this function, you add 2 hours to the utcNow(). Just remember the utcNow() date and time will vary based on your time zone.

addHours(utcNow(), +2)

Fausto Capellan, Jr


Did I answer your question? Mark my post as a solution! Did my response help? Please give it a thumbs up!

Proud to be a Flownaut!


View solution in original post

Highlighted
Community Support Team
Community Support Team

Re: Get Now Date Time

Hi @Anonymous,

 

The UTCNow() function currently could only return the time in UTC time zone, and Microsoft Flow as an Online service, currently could only work with time in UTC time zone.

If you would like it to display in local time zone, then please take use of the Addhours funciton to deal with the time lag.

For example, if your time zone is PST, then to display the time correctly, you would need to take use of expression as below for the UTCNow():

AddHours(UTCNow(),-8)

For how to take use of expression, check the blog below:

Use expressions in flow actions

Please refer to the Working with dates part.

Regards,

Michael

Community Support Team _ Michael Shao
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

Anonymous
Not applicable

Re: Get Now Date Time

hello @faustocapellanj

 

 

Thank you for the reply i was using only utcnow() and in beirut its utc + 2 hours so now i used 

addHours(utcNow(),-14) so your proposed solution worked properly .

 

 

2134657687.png

 

 

Regards

Anonymous
Not applicable

Re: Get Now Date Time

hello @v-micsh-msft

 

 

Thank you for the reply i was using only utcnow() and in beirut its utc + 2 hours so now i used 

addHours(utcNow(),-14) so your proposed solution worked properly thank you.

 

 

2134657687.png

 

 

Regards

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons in April

Read the announcement for more information!

firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

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!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,638)