Skip to main content
Community site session details

Community site session details

Session Id : eGm38KFNJiwGKYQimyNEwB
Power Automate - General Discussion
Answered

How to get the hour in 24 format from date

Like (0) ShareShare
ReportReport
Posted on 4 Dec 2021 00:17:37 by Microsoft Employee

I have a date variable that shows the hour in 12-hour format, I need to set this date in 24-hour format and then extract the hours only in a 24-hour format so that I can transfer the incidents to the required team working in that hours. 

 

have tried using the  formatdatetime( variable, 'HH:mm:ss' ) , this shows the date in 24 hours but later when i tried to extract the hours using int (formatdatetime( 24hour variable, 'HH' ) , it goes back to 12 hours format 

 

 

 

  • Verified answer
    mahoneypat Profile Picture
    1,720 on 04 Dec 2021 at 02:14:29
    Re: How to get the hour in 24 format from date

    That is odd behavior.  When i put the below expression in a Compose, it returns 13.

     

    int(formatDateTime('11/22/2021 1:12:11 PM''HH'))
     
    Pat
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2