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 / Time minutes returning...
Power Apps
Unanswered

Time minutes returning only one digit if less than 10

(0) ShareShare
ReportReport
Posted on by 6

I'm 3 days in to Power Apps, so please go easy!

I've created an app which the user can select the date, hour and minute. The user then click a button which is connected to a Power Automate script and sends an email.

 

Below is the code used to capture the details within the app:

AddanitemtoSharePointandsendanemail.Run(DataCardValue8.Text, DataCardValue12.Text, DateValue1.SelectedDate, Value(HourValue1.Selected.Value), Value(MinuteValue1.Selected.Value);"mm", DataCardValue7.Text, User().FullName, User().Email);
Notify("Email has been sent");

 

Everything works Ok unless the user selects minutes which are less than 10. So for example, if you select 13:05, the email prints 13:5

If the user selects 15:00, the email prints 15:0. If the user select 12:30 from the app, the email prints 12:30 which is fine.

 

Within the SharePoint table, its stored correctly. It seems to be missing off the lead zero. I'm assuming this may be due to converting to text but can't seem to find a work around.

Any help and support would be welcome. Thanks in advance.

 

Categories:
I have the same question (0)
  • Dioz Profile Picture
    61 on at

    I ran into a similar problem lately. In my case the problem was that Power Apps recognizes "mm" as well as "MM" as month, if it's not connected to hh.
    Was able to resolve it by using something like:

    Right(
     Text(
     TimeValue(MinuteValue1.Selected.Value),
     "hh:mm"
     ),
     2
     )


    I can't say for sure if it helps in your case, but you might want to give it a try

  • Devvj Profile Picture
    1,132 Super User 2024 Season 1 on at

    Hi @PhillKebab01 

    Problem seems to be that you send the Hour and Minute parameters wraped in "Value()", which basicly cast them into a number, would it be possible to wrap it in "Text()" instead, with additional formating like the example @Dioz  made above?

     

  • PhillKebab01 Profile Picture
    6 on at

    Thanks for the support.  I'm now getting an output of 13:00 if the user selects any minute from the dropdown list.

     

    AddanitemtoSharePointandsendanemail.Run(DataCardValue8.Text, DataCardValue12.Text, DateValue1.SelectedDate, Value(HourValue1.Selected.Value), Right(Text( TimeValue(MinuteValue1.Selected.Value), "hh:mm"),2), DataCardValue7.Text, User().FullName, User().Email);
    Notify("Email has been sent");

  • Devvj Profile Picture
    1,132 Super User 2024 Season 1 on at

    Good to hear @PhillKebab01 ,
    please mark @Dioz post as the solution, to make it easier for others to find as well.


  • PhillKebab01 Profile Picture
    6 on at

    Hi Devvj, Just replying to say the issue is still not fixed. It displays 13:00 no matter what value is selected from the list.

    Any other ideas to try?

    Thanks.

  • Devvj Profile Picture
    1,132 Super User 2024 Season 1 on at

    Well if it is just dropdown boxes i guess you could have a basic IF-statement to just concatinate the 0 if the value is sub 10, something like this

    If(Value(MinuteValue1.Selected.Value) < 10, Contactenate("0",Text(MinuteValue1.Selected.Value)),Text(MinuteValue1.Selected.Value))
  • PhillKebab01 Profile Picture
    6 on at

    Thanks Devvj, I was mulling this over in my head, exactly what I was going to try next. I will give it a go later on today and let you know.

    Really appreciate the time replying back to me.

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 414

#2
WarrenBelz Profile Picture

WarrenBelz 377 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 315 Super User 2026 Season 1

Last 30 days Overall leaderboard