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
text
text
☑️
text containing duration in dd.HH:mm:ss:fff form
ticks
numeric
☑️
the number of ticks (tenthousandth of a millisecond)
number
numeric
☑️
a numeric value to combine with the date_unit
date_unit
keyword
☑️
one of the date_units: day, hour, minute, second, millisecond
day
numeric
☑️
the day unit (number of days)
hour
numeric
☑️
the hour unit (0 - 23)
minute
numeric
☑️
the minute unit (0 - 59)
second
numeric
☑️
the second unit (0 - 59)
millisecond
numeric
☑️
the millisecond unit (0 - 999)
Last updated