TotalHours
The whole number of hours in a duration: duration / 60, dropping any
leftover minutes. Unlike HoursPart, this doesn’t drop
whole days first: it’s the full duration expressed in hours.
Category: Time Returns: int
Signature
TotalHours(duration)
The argument is a duration in minutes, typically the result of another time function or a subtraction between two of them.
Examples
TotalHours(1500) // 25
TotalHours(FromDays(1)) // 24
TotalHours(AbsoluteMinutes()) >= 6 // six or more hours have passed
Notes
- Requires time to be enabled for the project (Project, then Time). With time disabled, any expression using this function fails validation.
- Contrast with HoursPart:
TotalHours(1500)is25(the full duration in hours), whileHoursPart(1500)is1(the hours left over once whole days are removed). - The inverse of FromHours, which converts hours to minutes.