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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Default Value for Time
Power Apps
Answered

Default Value for Time

(0) ShareShare
ReportReport
Posted on by

Hi All,

 

I have a table in dataverse with various columns including a column called 'Date'.

 

I have made a canvas app which has two screens - the first screen has a gallery which has an overview of some important columns, When a column in the row is clicked it opens screen two which populates textboxes and combo boxes with the data of the selected row.

 

This works fine however I have a problem with the 'Date' column. I would like to display the time from the gallery in combo boxes. 

 

I have tried 

 

Gallery1.Selected.Date

 

in the Default field of the hours and minutes combo boxes but this just gives me 00:00.

 

Can anyone help?

 

Thanks 

Categories:
I have the same question (0)
  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    @AshleyTaylor,

     

    You can use the following code for the comboboxes:

    //Hours combobox
    
    //Items property (display hours starting from 00 until 23)
    ForAll(
     Sequence(24),
     Text(
     Value - 1,
     "00"
     )
    )
    
    //DefaultSelectedItems property
    //In case of a dropdown this would be Text(Hour(Gallery1.Selected.Date),"00") in the Default property
    [Text(Hour(Gallery1.Selected.Date),"00")]

     

    //Minutes combobox
    
    //Items property (display minutes starting from 00 until 59)
    ForAll(
     Sequence(60),
     Text(
     Value - 1,
     "00"
     )
    )
    
    //DefaultSelectedItems property
    //In case of a dropdown this would be Text(Minute(Gallery1.Selected.Date),"00") in the Default property
    [Text(Minute(Gallery1.Selected.Date),"00")]

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 529 Most Valuable Professional

#2
Haque Profile Picture

Haque 230

#3
Kalathiya Profile Picture

Kalathiya 217 Super User 2026 Season 1

Last 30 days Overall leaderboard