Duration.Seconds
The seconds part of a duration, beyond its whole minutes, with any fraction of a second.
Group: Dates and times. Power Query M has it too: a query that uses it is written as in Power BI.
Syntax
Duration.Seconds(duration as nullable duration) as nullable number
| Parameter | Type | Description |
|---|---|---|
duration | nullable duration | The duration; null gives null. |
Returns
nullable number. The seconds left over after the whole minutes; it can have decimals.
Remarks
- This is a part, not a total: 1 minute and 30.5 seconds give 30.5.
Duration.TotalSecondsgives 90.5. - A negative duration gives negative parts.
Examples
A checkout that took 90.5 seconds
Duration.Seconds(#duration(0, 0, 0, 90.5))
30.5
Between two scans at a till
Duration.Seconds(#datetime(2024, 3, 15, 14, 31, 12) - #datetime(2024, 3, 15, 14, 30, 50))
22