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 / Dropdown values compar...
Power Apps
Answered

Dropdown values comparison in powerapps.

(0) ShareShare
ReportReport
Posted on by 599

Hi,

In my app i need to compare End time is greater than Start time.

Following is my scenario,

Start Time : Time.jpg End Time : Time.jpg

 

Now i need to compare this two dropdown values.

If start time is less than End Time i need to display Notify msg.

 

If(Value(Concatenate(start.Value,":",minute.Value))<Value(Concatenate(End.Value,":",minute1.Value)),Notify("To Hour must be gretaer than Starting Hour",NotificationType.Warning)).

 

Is this correct?

 

Thanks.

 

Categories:
I have the same question (0)
  • Digital Profile Picture
    1,207 on at

    Hi @Dhinesh28R ,

     

    Put this in your startHour Items property:

    RenameColumns(DropColumns(AddColumns(Sequence(25,0),"DateText",Text(Value,"00")),"Value"),"DateText","Value")

     

    And this in the startMin Items property:

    RenameColumns(DropColumns(AddColumns(Sequence(59,0),"DateText",Text(Value,"00")),"Value"),"DateText","Value")

     

    Repeat for your endHour and endMin Items.

     

    You can convert the selected values to date type using DateTimeValue and compare them using DateDiff

     

    For my test condition I have output a text box but you could use this condition in the visible property of a label, or to trigger an alert.

    If(
     DateDiff(
     DateTimeValue(startHour.Selected.Value & ":" & startMin.Selected.Value),
     DateTimeValue(endHour.Selected.Value & ":" & endMin.Selected.Value),Minutes
     ) <0,
     "Alert! Start time is less that end time",
     "Start time is greater than end time"
    )

     

  • Verified answer
    CU-18081211-6 Profile Picture
    9,270 Moderator on at

    @Dhinesh28R,

    Use time function like:

    Time(startHourDropDown.Selected.Value, startMinutesDropDown.Selected.Value,0)

    and then compare the two values.

    Hope it helps !

  • Dhinesh28R Profile Picture
    599 on at

    Hi @gabibalaban,
    After converting and then Compare Now its working man.

     

    Thanks.

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 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard