Date Functions Overview

Updated on

Learn about Date Functions in Power Query M Language, the key for working with dates. This page provides a comprehensive list and descriptions of Date Functions available in the M Language.

Table of contents

Learn about Date Functions in Power Query M Language, key for working with dates. This page provides a comprehensive list and descriptions of Date Functions available in the M Language.

Date Component Functions

FunctionDescription
Date.DayExtracts the day part from a specified date.
Date.DayOfWeekReturns a number (between 0 and 6) representing the day of the week for a given date.
Date.DayOfWeekNameReturns the name of the weekday.
Date.DayOfYearReturns a number from 1 to 366 representing the day of the year.
Date.DaysInMonthReturns a number between 28 and 31 representing the total days in the month.
Date.MonthExtracts the month part from a specified date.
Date.MonthNameReturns the name of the month.
Date.QuarterOfYearReturns a number indicating which quarter of the year the date falls in.
Date.WeekOfMonthReturns a number between 1 and 6 representing the week of the month for a given date.
Date.WeekOfYearReturns a number between 1 and 54 representing the week of the year for a given date.
Date.YearExtracts the year part from a specified date.

Creation and Conversion Functions

FunctionDescription
#dateCreates a date value from whole numbers representing the year, month, and day.
Date.FromCreates a date from the given value.
Date.FromTextCreates a Date from local, universal, and custom Date formats.
Date.ToRecordReturns a record containing parts of the date value.
Date.ToTextReturns a textual representation of the date value.

Date Modification Functions

FunctionDescription
Date.AddDaysIncrements the date by the provided number of days.
Date.AddMonthsIncrements the date by the provided number of months.
Date.AddQuartersIncrements the date by the provided number of quarters.
Date.AddWeeksIncrements the date by the provided number of weeks.
Date.AddYearsIncrements the date by the provided number of years.

Information Functions

FunctionDescription
Date.IsInCurrentDayChecks if the specified date is during the current day.
Date.IsInCurrentMonthChecks if the specified date is during the current month.
Date.IsInCurrentQuarterChecks if the specified date is during the current quarter.
Date.IsInCurrentWeekChecks if the specified date is during the current week.
Date.IsInCurrentYearChecks if the specified date is during the current year.
Date.IsInNextDayChecks if the specified date is during the next day
Date.IsInNextMonthChecks if the specified date is during the next month
Date.IsInNextNDaysChecks if the specified date is during the next number of days
Date.IsInNextNMonthsChecks if the specified date is during the next number of months
Date.IsInNextNQuartersChecks if the specified date is during the next number of quarters
Date.IsInNextNWeeksChecks if the specified date is during the next number of weeks
Date.IsInNextNYearsIndicates whether this date occurs during the next number of years
Date.IsInNextQuarterChecks if the specified date is during the next quarter
Date.IsInNextWeekChecks if the specified date is during the next week
Date.IsInNextYearChecks if the specified date is during the next year
Date.IsInPreviousDayChecks if the specified date is during the previous day
Date.IsInPreviousMonthChecks if the specified date is during the previous month
Date.IsInPreviousNDaysChecks if the specified date is during the previous number of days
Date.IsInPreviousNMonthsChecks if the specified date is during the previous number of months
Date.IsInPreviousNQuartersChecks if the specified date is during the previous number of quarters
Date.IsInPreviousNWeeksChecks if the specified date is during the previous number of weeks
Date.IsInPreviousNYearsChecks if the specified date is during the previous number of years
Date.IsInPreviousQuarterChecks if the specified date is during the previous quarter
Date.IsInPreviousWeekChecks if the specified date is during the previous week
Date.IsInPreviousYearChecks if the specified date is during the previous year
Date.IsInYearToDateChecks if the specified date is during the current year and is on or before the current day.
Date.IsLeapYearChecks if the specified date falls in a leap year.

Start-End Functions

FunctionDescription
Date.EndOfDayReturns the end of the day.
Date.EndOfMonthReturns the end of the month.
Date.EndOfQuarterReturns the end of the quarter.
Date.EndOfWeekReturns the end of the week.
Date.EndOfYearReturns the end of the year.
Date.StartOfDayReturns the start of the day.
Date.StartOfMonthReturns the start of the month.
Date.StartOfQuarterReturns the start of the quarter.
Date.StartOfWeekReturns the start of the week.
Date.StartOfYearReturns the start of the year.

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

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