Duration Functions Overview

Updated on

Delve into Duration Functions in Power Query M Language, essential when working with duration data. This page provides a comprehensive list and descriptions of Duration Functions available in the M Language.

Component Functions

FunctionDescription
Duration.DaysReturns the days portion of a duration.
Duration.HoursReturns the hours portion of a duration.
Duration.MinutesReturns the minutes portion of a duration.
Duration.SecondsReturns the seconds portion of a duration.

Creation and Conversion Functions

FunctionDescription
#durationCreates a duration value from numbers representing days, hours, minutes, and (fractional) seconds.
Duration.FromCreates a duration from the given value.
Duration.FromTextReturns a duration value from textual elapsed time forms (d.h:m:s).
Duration.ToRecordReturns a record containing the parts of the duration.
Duration.ToTextReturns the text of the form “d.h:m:s”.

Extraction Functions

FunctionDescription
Duration.TotalDaysReturns the total days this duration spans.
Duration.TotalHoursReturns the total hours this duration spans.
Duration.TotalMinutesReturns the total minutes this duration spans.
Duration.TotalSecondsReturns the total seconds this duration spans.

Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/powerquery-m/duration-functions

2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy