Duration.FromText

This function extracts a duration value from the provided text. The function can parse the following formats: (-)hh:mm(:ss(.ff)) (-)ddd(.hh:mm(:ss(.ff))) All ranges are inclusive. ddd: Number of days....

Syntax

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

About

This function extracts a duration value from the provided text. The function can parse the following formats: (-)hh:mm(:ss(.ff)) (-)ddd(.hh:mm(:ss(.ff))) All ranges are inclusive. ddd: Number of days. hh: Number of hours, from 0 to 23. mm: Number of minutes, from 0 to 59. ss: Number of seconds, from 0 to 59. ff: Fraction of seconds, from 0 to 9999999.

Explanation

Transform the string "2.05:55:20" into a duration value by utilizing Power Query MDuration.FromText("2.05:55:20"). The resulting output will be #duration(2, 5, 55, 20).