Berserk Docs
Scalar FunctionsDate & Time Functions

totimespan

Convert the input to a timespan.

A string is parsed as a duration; a number counts 100-nanosecond ticks, as in Microsoft's KQL. A datetime or a bool is null with a warning: Microsoft's answer for a datetime is the time since 0001-01-01, longer than a timespan holds. See datetime and timespan.

Syntax

totimespan(value)

Parameters

Prop

Type

Returns: timespan

Examples

Example 1

print totimespan("14.00:00:00") // a fortnight sailing from Norway to Northumbria
print_0 (timespan)
14.00:00:00

On this page