Duration.From

About

Returns a duration value from a value.

Syntax

Duration.From(value as any) as nullable duration  

Arguments

Argument Description
value Value to convert.

Values of the following types can be converted to a duration value:

Type to Convert Description
text Returns a duration value from a text value in a elapsed time format of d.hⓂ️s. For more details, see Duration.FromText.
number A duration equivalent to the number of whole and fractional days expressed by value.
Any other type An error is returned

Remarks

  • If a value is null, Duration.From returns null.

  • If a value is duration, the same value is returned.

Example

Duration.From(2.525) equals #duration(2,12,36,0)