IMHO, the total time elapsed in your example is 56:45:00, which can be calculated simply by =
Timestamp ( EndDate ; EndTime ) - Timestamp ( StartDate ; StartTime )
From this you can easily extract the hours, minutes and seconds using the corresponding functions.
Ok. How to state the total hours into 00 hours 00 minutes format instead of 00:00:00?
As I said, use the Hour(), Minute() and Seconds() functions to extract the elements, e.g.:
Let ( [
elapsed = Timestamp ( EndDate ; EndTime ) - Timestamp ( StartDate ; StartTime )
SerialIncrement ( "00" ; Hour ( elapsed ) ) & " hours " & SerialIncrement ( "00" ; Minute ( elapsed ) ) & " minutes"
I am looking to do the same thing. I want a field to display "X Hours XX Minutes". Currently, my calculation outputs "5.73 Hours". My existing calculation is:
((Day01Exit05 - (If ( Day01Exit05 = "" ; "" ; Day01Entry05))) + (Day01Exit04 - (If ( Day01Exit04 = "" ; "" ; Day01Entry04))) + (Day01Exit03 - (If ( Day01Exit03 = "" ; "" ; Day01Entry03))) + (Day01Exit02 - (If (Day01Exit02 = "" ; "" ; Day01Entry02))) + (Day01Exit01 - (If ( Day01Exit01 = "" ; "" ; Day01Entry01))))/3600
All the fields referenced in the calculation are timestamps. Any simple modifications I can make to this script so it will display hours and minutes instead of hours with a decimal?
Here's a calculation, all you need to do is substitute '$duration' with a value in minutes:
Case ( $duration > 59; Div ( $duration; 60 ) & " Hours " ) & Case ( Mod ( $duration; 60 ) <> 0; Int ( Mod ( $duration; 60 ) ) & " Minutes" )
Another option, if you don't need the actual words "Hours, minutes and seconds", is to simply choose time as your result type for the calculation and use inspector to format the field with an HHMMSS, 24 hour format.