cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
v-yamao-msft
Community Support
Community Support

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

4 REPLIES 4
v-yamao-msft
Community Support
Community Support

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.
Anonymous
Not applicable

Thanks @v-yamao-msft That worked perfectly!

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.

Thanks!!!

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (5,240)