Duration functions

Duration functions functions for Power Query M language.

Functions

FunctionDescription
#durationGenerates a duration by converting numerical values that represent days, hours, minutes, and fractions of seconds.
Duration.DaysThis function retrieves the number of days from a specified duration.
Duration.FromThe function returns a duration value based on the input value provided. If the input value is null, the function will also return null. If the input value is already a duration, it will simply be ret...
Duration.FromTextThis 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....
Duration.HoursThis function retrieves the number of hours from the specified duration.
Duration.MinutesThis function retrieves the number of minutes from a given time duration.
Duration.SecondsThis function extracts the seconds component from a duration.
Duration.ToRecordThe function will provide a data set that includes the duration value from which the record is generated, named duration.duration.
Duration.ToTextThis function will provide a text format showing the duration value in the format "day.hour:mins:sec". The duration value provided will be used to calculate this text representation. The 'format' para...
Duration.TotalDaysReturns the total number of days covered by a specific duration.
Duration.TotalHoursThis function calculates the total number of hours included in a given duration.
Duration.TotalMinutesThis function calculates the total number of minutes covered by a given duration.
Duration.TotalSecondsThis function calculates the total number of seconds included in the specified duration.