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 / Two labels with Text, ...
Power Apps
Answered

Two labels with Text, source to calculate worktime-pause "hh:mm"

(0) ShareShare
ReportReport
Posted on by 44

Hey all again!

I have two labels with Text. For example "03:16" and "00:06".

Now i want to calculate A-B="03:10". How i can do this?

I want to calculate with the Result too. In further functions i want to sum all worktime of a week.

 

I want to build a little Timetracker. Calculate with date and time oder sharepoint is really horrible 😞

 

Thanks!

Categories:
I have the same question (0)
  • Verified answer
    timl Profile Picture
    36,682 Super User 2026 Season 1 on at

    Hi @CPKH 

    The following function will provide the difference in minutes between the 2 times. In this example, the result will be 190.

    DateDiff(TimeValue("00:06"),TimeValue("03:16"), Minutes)

    In your case, you can refer to your labels, rather than use hardcoded values.

    You can then use this with the formula in your other post to display the duration in hh:mm format.

     

    RoundDown(DateDiff(TimeValue("00:06"),TimeValue("03:16"), Minutes)/60,0) & 
    ":" & 
    Text(Mod(DateDiff(TimeValue("00:06"),TimeValue("03:16"), Minutes),60), "00") 

    If you post some additional details about your summing requirements, we can provide some more specific help.

  • CPKH Profile Picture
    44 on at

    It works perfectly! thanks!

    Could u answer me, why we have to use mod() for the minutes "00:XX". I don't undertstand that part.

    I was confused... i first tried

    TimeValue("00:06") and thats "12:06 AM"

    So i thought i cannot take it, because now its a real time and not just a number in a time format i can calculate with.

    Thats all at the moment, thanks for your help!

  • timl Profile Picture
    36,682 Super User 2026 Season 1 on at

    Hi @CPKH 

    Glad that works for you.

    The Mod function returns the remainder after the division of 2 numbers.

    Taking the example of 190 minutes...

    Mod(190, 60) = 10

    60 goes into 190 3 times, with 10 left over. This 10 value provides us with the minute component of 03:10.

    Hope that makes sense to you!

  • CPKH Profile Picture
    44 on at

    Ah! Yes, makes it 🙂 Thanks @timl !

     

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
Haque Profile Picture

Haque 85

#2
WarrenBelz Profile Picture

WarrenBelz 76 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard