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 / Convert whole number t...
Power Apps
Unanswered

Convert whole number to hours and minutes

(1) ShareShare
ReportReport
Posted on by 46

I have an input box (TextBox1) that asks for an amount of minutes. From there I output to 3 labels

 

label1 = The original time from the input (TextBox1)

label2 = The original time plus 25% (TextBox1*1.25)

label3 = The original time plus 50% (TextBox1*1.5)

 

Example

Enter time in mins = 60

label1 = 60

label2 = 75

Label3 = 90

 

How can I change these labels so they show the outcome in hours and minutes. I want it to say

label1= 1 hour (or 60 mins)

label2= 1 hour 15 minutes

label3 = 1 hour 30 minutes

 

thanks all

Categories:
I have the same question (0)
  • Verified answer
    poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    Something like this:

     

     

    Concatenate(Text( ((Value(Label1.Text)/60) )), " hours ", Text( Mod(Value(Label1.Text),60 )), " minutes " )

     

     

    Tested:

     

    poweractivate_0-1635502953527.png

     

     

    See if it works. 

  • Verified answer
    poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @insurin Thank you for accepting my solution. However I tested it again now, and my solution was not quite right, it will put a decimal in the hours if the number is say, 68. Instead use this tested formula. I also rewrote it to put repeated parts of the formula in a With clause for better maintainability. Check below:

     

     

     

    With({_value:Value(Label1.Text),_num60:60},Concatenate(Text(RoundDown((_value/_num60),0)), " hours ", Text( Mod(_value,_num60 )), " minutes " ))

     

     

     

    poweractivate_0-1635503312695.png

     

    Check if above works better for you @insurin 

     

    In case you really don't like the With statement being there - here is the solution I originally gave but rewritten correctly if you want With not to be present in the solution for some reason:

     

     

    Concatenate(Text( (RoundDown((Value(Label1.Text)/60),0) )), " hours ", Text( Mod(Value(Label1.Text),60 )), " minutes " )

     

     

    poweractivate_0-1635503506278.png

     

    I recommend the version I gave above that has the With statement in it though.

     

    Check if it helps @insurin 

     

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard