web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to get the hour in...
Power Automate
Unanswered

How to get the hour in 24 format from date

(0) ShareShare
ReportReport
Posted on 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 

 

 

 

Categories:
I have the same question (0)
  • Verified answer
    mahoneypat Profile Picture
    1,720 on at

    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard