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 / Displaying time in a F...
Power Apps
Answered

Displaying time in a Form date picker not working

(0) ShareShare
ReportReport
Posted on by

Hi,

 

I'm doing an app where you fill a form to open a ticket (what an innovative app 😄 ).When I click on the icon to go to the form page, I use this line to set my variables do display : 

 

Set(_MinuteCal; Minute(Now()))&Set(_HeureCal;Hour(Now()))&Set(_DateCal; Today())

 

On my form page, I put in HourValue.Default : _HeureCal  then in MinuteValue.Default : _MinuteCal and in DateValue.Default : _DateCal.

My problem is that when the hour or minute value are less than 10 it displays the value : 0 in my date picker.

 

PB_minutes.pngPB_Heure.png

 

Even if I do a ResetForm, the value is not displayed right.

The right values appears only when HourValue or MinuteValue are greater than 10.

 

Do you have any thoughts about how to make it work correctly ?

 

 

Thank you in advance.

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,117 Most Valuable Professional on at

    Hi @Anonymous ,

    What exactly is that control you are displaying the hour and minute in ? I just put _MinuteCal in a label and got 9 (it was 7:09PM here when I ran your exact code).

    WarrenBelz_0-1679994750052.png

     

    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 the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Community Power Platform Member Profile Picture
    on at

    As you can see the Label displaying _MinuteCal and _HeureCal are displaying the correct numbers.

    But the DatePickerDataCard is not displaying numbers correctly under 10.

     

    The control is a dropdown menu.

  • WarrenBelz Profile Picture
    153,117 Most Valuable Professional on at

    What is the Items and Default of the drop-down ? I just tested one with the Items

    Sequence(60)

    as below

    WarrenBelz_0-1679995675793.png

    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 the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

     

  • Community Power Platform Member Profile Picture
    on at

    For the minutes display : 

    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"]

     

    Default : _MinuteCal

     

     

    For the 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"]

     

    Default : _HeureCal

  • Verified answer
    WarrenBelz Profile Picture
    153,117 Most Valuable Professional on at

    @Anonymous , 

    The issue is that 9 is not "09" and drop-downs need the Default to be in the "schema" of the Items to display, so put in your Default 

    Text(_MinuteCal,"00")

    Also the Items can be

    ForAll(
     Sequence(60,0),
     Text(
     Value,
     "00"
     )
    )

     

    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 the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Community Power Platform Member Profile Picture
    on at

    Thank you very much, it's working 😄

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard