Duration.FromText

 

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 text value.

Duration.FromText(duration as nullable text) as nullable duration  

ArgumentDescription
DurationThe text to convert.
Format
[-]hh:mm[:ss]
[-]ddd.hh:mm[:ss]

Note: The values within brackets [] are optional.

Format parts

PartDescription
[-]The text value is prepended with an optional negative sign [-] to indicate a negative duration value.
[d]The [d] part represents the day portion of the duration value.
[m]The [m] part represents the minute portion of the duration value.
[s]The [s] part represents the second portion of the duration value.
Duration.FromText("15:35") equals 15 hours, 35 minutes  

Duration.FromText("2.15:00") equals 2 days, 15 hours  

Show: