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

Displaying time in a Form date picker not working

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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
    155,717 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
    Microsoft Employee 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
    155,717 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
    Microsoft Employee 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
    155,717 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
    Microsoft Employee 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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 471

#2
WarrenBelz Profile Picture

WarrenBelz 395 Most Valuable Professional

#3
11manish Profile Picture

11manish 279

Last 30 days Overall leaderboard