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 / Is hour integer or str...
Power Automate
Unanswered

Is hour integer or string? how to display hour from date as a number only?

(0) ShareShare
ReportReport
Posted on by 127

I have an hour number column in my sharepoint list. the value of column hour is any single number from [0,1,2,3,4,5,6,7....22,23,24]

IDHourtitle
17 

Now i want my flow to run based on my condition which is :

run if hour value in sharepoint is equal to  the current hour

I tried the following:

this one works fine but I should put manually 7

Sebey_0-1688799580856.png

I tried to make it better by using expression in the value of 7 so that it will always compare with current hour of the day:

Sebey_1-1688799708388.png

 

but this one fails, it doesnot work.

hour field in my sharepoint list is number data type.

your suggestions and solutions are welcomed

Categories:
I have the same question (0)
  • Verified answer
    Matthy79 Profile Picture
    4,180 Super User 2024 Season 1 on at

    Hello @Sebey 

     

    If you use formatDateTime the result is a string and that can't be compared to a number. Use "int" to convert it.

  • Verified answer
    Mitanshu Profile Picture
    1,650 Moderator on at

    Try the following expression:

     

    int(formatDateTime(utcNow(),'HH'))

     

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If this post or my previous reply was useful in other ways, please consider giving it Thumbs Up.

     

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