Time Functions Overview

Explore Time Functions in Power Query M Language, vital for handling time values. This page provides a comprehensive list and descriptions of Time Functions available in the M Language.

Creation and Conversion Functions

FunctionDescriptionInputOutput
#timeCreates a time value from numbers representing the hour, minute, and (fractional) second.NumberTime
Time.FromCreates a time from the given value.AnyTime
Time.FromTextCreates a Time from local and universal, and custom Time formats.TextTime
Time.ToRecordReturns a record containing the Time value’s parts.TimeRecord
Time.ToTextReturns a textual representation of the time value.TimeText

Start-End Functions

FunctionDescriptionInputOutput
Time.EndOfHourReturns the end of the hour.AnyAny
Time.StartOfHourReturns the start of the hour.AnyAny

Time Component Functions

FunctionDescriptionInputOutput
Time.HourReturns the hour component.AnyNumber
Time.MinuteReturns the minute component.AnyNumber
Time.SecondReturns the second component.AnyNumber
BI Gorilla Blog

Last update: November 24, 2023 | Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/powerquery-m/time-functions
© 2023 BI Gorilla. All rights reserved. Content derived from Microsoft documentation is property of Microsoft Corp.