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 Apps / Check is timevalue is ...
Power Apps
Unanswered

Check is timevalue is between values

(1) ShareShare
ReportReport
Posted on by 329

Hi,

 

I have a SQL-Table with a DateTime Column.

I have a Form in powerapps that splits the column in Dates, hours and minutes

 

I want to automatically Update a textbox on hour and minute values.

 

for example:

If the time is between;

05:45 - 13:44 (Update with value A)
13:45 - 21:44 (Update with value B)
21:45 - 05:45 (Update with value C)

 

Any idea to do this?

 

Regards,

Categories:
I have the same question (0)
  • Verified answer
    mdevaney Profile Picture
    29,989 Moderator on at

    @PVosEska 

    Put this formula in the Text property of your label or text input.

     

    With(
     {myTime: Time(drpdown_hour.Selected.Value, drpdown_minute.Selected.Value, 0)},
     If(
     myTime > Time(5,45,0), "C",
     myTime <= Time(5,45,00) And myTime > Time(13,45,0), "A",
     myTime <= Time(13,45,00) And myTime > Time(21,45,0), "B",
     myTime <= Time(21,45,00), "C"
     )
    )

     

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up." 

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @PVosEska 

     

    Try this related solution:

     

    Compare two times 

     

  • Verified answer
    PVosEska Profile Picture
    329 on at

    That was a great start @mdevaney ,

     

    The only issue was the time from 00:00 to 05:45. 

    I changed the formula a little, and it works great now.

     

    With(
     {myTime: Time(HourValue1.Selected.Value,MinuteValue1.Selected.Value, 0)},
     If(
     myTime >= Time(00,00,0) And myTime < Time(5,45,00), "N",
     myTime >= Time(5,45,00) And myTime < Time(13,45,0), "O",
     myTime >= Time(13,45,00) And myTime < Time(21,45,0), "M",
     myTime >= Time(21,45,00), "N"
     )
    )

     

     Thanks for the very quick reply!

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard