Duration.From

 

This topic applies to the Power Query Formula Language which can be used with Power Query and Power BI Desktop to build queries that mashup data. See the list of function categories.

Returns a duration value from a value.

Duration.From(value as any) as nullable duration  

ArgumentDescription
valueValue to convert.

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

Type to ConvertDescription
textReturns a duration value from a text value in a elapsed time format of d.h:m:s. For more details, see Duration.FromText.
numberA duration equivalent to the number of whole and fractional days expressed by value.
Any other typeAn error is returned
  • If a value is null, Duration.From returns null.

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

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

Show: