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

UTC now 12 / 24 hour format

Hi all,

I've recently been using "@{utcnow('hh')}" to return the current hour. I was naively expecting this to be in 24 hour format by defaulty but its in 12 hour, i.e. 0-12.

 

Does anyone know how to get the current hour in 24 hour format? Its a pain to test during office hours!

Thanks,

Eddie

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: UTC now 12 / 24 hour format

Hi Eddie_Thomas,

 

To get the current hour, the function I am using is “@formatDateTime(utcnow(),'HH')”.


I also tried with your function, please just modify your function to “@utcnow('HH')”.

 

This doc about “Custom Date and Time Format Strings” could be a reference for you, please check it for more details about the difference between “hh” and “HH”:
https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings

4.PNG

 


Best regards,
Mabel Mao

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

3 REPLIES 3
Community Support Team
Community Support Team

Re: UTC now 12 / 24 hour format

Hi Eddie_Thomas,

 

To get the current hour, the function I am using is “@formatDateTime(utcnow(),'HH')”.


I also tried with your function, please just modify your function to “@utcnow('HH')”.

 

This doc about “Custom Date and Time Format Strings” could be a reference for you, please check it for more details about the difference between “hh” and “HH”:
https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings

4.PNG

 


Best regards,
Mabel Mao

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

Anonymous
Not applicable

Re: UTC now 12 / 24 hour format

Thanks @v-yamao-msft That worked perfectly!

Community Support Team
Community Support Team

Re: UTC now 12 / 24 hour format

Hi Eddie_Thomas,

 

Glad to hear that it works for you.

 

Any time you have issues when working with Flow, please feel free post your issues here, we are always ready to help.

Best regards,
Mabel Mao

 

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.

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 (4,681)