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 / How to display all hou...
Power Apps
Unanswered

How to display all hours and minutes in drop down

(0) ShareShare
ReportReport
Posted on by

I am trying to use a DatePicker to select the date and time that a user wants. However the current implementation on PowerApps only seems to allow me to modify the date element and not the time.

 

To combat this, i am building two drop downs, one for hours and another for minutes. However, having to painstakingly right the numbers from 0 to 23 and 00 to 59 is getting rather annoying.

 

Does anyone know a faster, more efficient implementation of this, or if i am getting this completely wrong and there is a completely different way, please let me know.

 

Thanks in advance

Categories:
I have the same question (0)
  • bean Profile Picture
    568 on at

    I cant figure anything out, other than writing them all out..

     

    Not sure what the purpose of your app is, but if the user is perhaps booking something, you could make it go in 5,10,15 or 30 minute intervals. This will make the list far less cluttered too. In addition, you could make the hours column only run 1-12 and then have a toggle for am/pm. 

     

    If the scenario is that the user needs their exact time, you could use the Now() function

     

    Sean

  • SanAndresMan72 Profile Picture
    19 on at

    You could setup a SharePoint list/Excel spreadsheet/CSV file for the hours and another list for the minutes then bound each control to the list

     

    MG.-

    Mariano Gomez, MVP

     

  • nickduxfield Profile Picture
    497 on at

    What data source are you writing to?

    Do you have a complex type date & time field  in that source or are you going for a number field? Or are you trying to accomplish this using single line of text.

  • Community Power Platform Member Profile Picture
    on at

    We are writting to Dynamics 365 on a date time field.

  • Verified answer
    nickduxfield Profile Picture
    497 on at

    If you have the Date and Time source column it should produce the below. You can use the syntax if you are trying to create your own date and time field. However, is there a need? Let me know if I'm off point.

    A quick way is to quickly make another source list of one column as a complex type Date and Time field. SharePoint Lists allow this to be fast. Then you import that data source, and copy all the controls to your own destination. Then you can remove the datasource. Let it build that for you.

    Otherwise copy the syntax directly in the controls.

    Minutes Items

    ["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59"]

    Hours Items

    ["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"]

    Update (DataCard)

    DateValue2.SelectedDate + Time(Value(HourValue2.Selected.Value), Value(MinuteValue2.Selected.Value), 0)

    (Its numbers so its just adding)

     

    dateandtime1.PNG

     

     

     

     

     

     

     

     

     

     

     

    dateandtime3.PNG

     

     

     

     

     

     

     

     

     

     

     

     

     

    dateandtime5.PNGdateandtime2.PNG dateandtime4.PNG

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

  • Community Power Platform Member Profile Picture
    on at

    Yeh, this was what i built the drop downs off of. However the process we are reproducing requires a slightly different approach to this. Rather than getting users to fill out forms directly, we are getting them to fill out questions which then get mapped to the forms hidden elsewhere on powerapps. This is so we can ensure we can match the data that is already in existinance within CRM.

     

    Thanks for your help!

  • nickduxfield Profile Picture
    497 on at

    Sounds interesting. Give us a bell if allowed

  • nickduxfield Profile Picture
    497 on at

    Just updates the post with the syntax so you can copy and paste

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard