ToDuration
The ToDuration()
function converts provided input to a specific Duration value. Possible values are a string ("dd.HH:mm:ss.fff"), ticks, a number with specified date-unit or specific numeric values for days, hours, minutes, seconds and milliseconds.
This function is NOT SQL compatible. For more information about SQL compatibility, see our documentation.
Returns a Duration
value compiled from the input values.
Returns Unknown
if one of the parameter values is unknown or outside the common valid boundaries.
Syntax
Parameters
Name | Type | Required | Description |
---|---|---|---|
| text | ☑️ | text containing duration in dd.HH:mm:ss:fff form |
| numeric | ☑️ | the number of ticks (tenthousandth of a millisecond) |
| numeric | ☑️ | a numeric value to combine with the date_unit |
| keyword | ☑️ | one of the date_units: day, hour, minute, second, millisecond |
| numeric | ☑️ | the day unit (number of days) |
| numeric | ☑️ | the hour unit (0 - 23) |
| numeric | ☑️ | the minute unit (0 - 59) |
| numeric | ☑️ | the second unit (0 - 59) |
| numeric | ☑️ | the millisecond unit (0 - 999) |
Last updated