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
Highlighted
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

3 REPLIES 3
Highlighted
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

Highlighted
Anonymous
Not applicable

Thanks @v-yamao-msft That worked perfectly!

Highlighted

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Users online (8,790)