Duration.FromText is a Power Query M function that parses a text value and returns a duration value. The function returns a duration value based on the specified text format.
Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365
Duration.FromText( text as nullable text ) as nullable duration
Returns a duration value from the specified text,
text. The following formats can be parsed by this function:
(All ranges are inclusive)
ddd: Number of days.
hh: Number of hours, between 0 and 23.
mm: Number of minutes, between 0 and 59.
ss: Number of seconds, between 0 and 59.
ff: Fraction of seconds, between 0 and 9999999.
"2.05:55:20" into a
// Output: #duration( 2, 5, 55, 20 ) Duration.FromText( "2.05:55:20" )
Other functions related to Duration.FromText are: