Datetimezone Functions Overview

Discover Datetimezone Functions in Power Query M Language, crucial for handling date, time and timezone values. This page provides a comprehensive list and descriptions of Datetimezone Functions available in the M Language.

Component Functions

FunctionDescriptionInputOutput
DateTimeZone.ZoneHoursChanges the timezone of the value.DatetimezoneNumber
DateTimeZone.ZoneMinutesChanges the timezone of the value.DatetimezoneNumber

Creation and Conversion Functions

FunctionDescriptionInputOutput
#datetimezoneCreates a datetimezone value from numbers representing the year, month, day, hour, minute, (fractional) second, (fractional) offset-hours, and offset-minutes.NumberDatetimezone
DateTimeZone.FromCreates a datetimezone from the given value.AnyDatetimezone
DateTimeZone.FromFileTimeCreates a datetimezone from a 64 bits long number.NumberDatetimezone
DateTimeZone.FromTextCreates a datetimezone from local, universal, and custom datetimezone formats.TextDatetimezone
DateTimeZone.ToLocalConverts the timezone component to the local timezone.DatetimezoneDatetimezone
DateTimeZone.ToRecordReturns a record containing the datetimezone value’s parts.DatetimezoneRecord
DateTimeZone.ToTextReturns a textual representation of the datetimezone value.DatetimezoneText
DateTimeZone.ToUtcConverts the timezone component to UTC timezone.DatetimezoneDatetimezone

Current Value Functions

FunctionDescriptionInputOutput
DateTimeZone.FixedLocalNowReturns the current date & time in the local timezoneDatetimezoneDatetimezone
DateTimeZone.FixedUtcNowReturns the current date and time in UTC (the GMT timezone)DatetimezoneDatetimezone
DateTimeZone.LocalNowReturns the current date & time in the local timezone.DatetimezoneDatetimezone
DateTimeZone.UtcNowReturns the current date and time in UTC (the GMT timezone).DatetimezoneDatetimezone

Modification Functions

FunctionDescriptionInputOutput
DateTimeZone.RemoveZoneRemoves timezone information from the given datetimezone value.DatetimezoneDatetime
DateTimeZone.SwitchZoneChanges the timezone of the value.DatetimezoneDatetimezone
BI Gorilla Blog

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