DaysPart
The days component of a duration: duration / 1440. Preserves the
duration’s sign.
Category: Time Returns: int
Signature
DaysPart(duration)
The argument is a duration in minutes, typically the result of another time function or a subtraction between two of them.
Examples
DaysPart(FromDays(2) + FromHours(5)) // 2
DaysPart(FromHours(20)) // 0, less than a full day
DaysPart(-FromDays(2)) // -2, sign preserved
Notes
- Requires time to be enabled for the project (Project, then Time). With time disabled, any expression using this function fails validation.
- Days is the largest unit the duration functions decompose, so
DaysPartand TotalDays compute the same value: there’s no larger unit left to peel off first. - Pairs with HoursPart and MinutesPart to decompose a duration into a “D days, H hours, M minutes” display.