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
| Function | Description |
|---|---|
| Date.Day | Extracts the day part from a specified date. |
| Date.DayOfWeek | Returns a number (between 0 and 6) representing the day of the week for a given date. |
| Date.DayOfWeekName | Returns the name of the weekday. |
| Date.DayOfYear | Returns a number from 1 to 366 representing the day of the year. |
| Date.DaysInMonth | Returns a number between 28 and 31 representing the total days in the month. |
| Date.Month | Extracts the month part from a specified date. |
| Date.MonthName | Returns the name of the month. |
| Date.QuarterOfYear | Returns a number indicating which quarter of the year the date falls in. |
| Date.WeekOfMonth | Returns a number between 1 and 6 representing the week of the month for a given date. |
| Date.WeekOfYear | Returns a number between 1 and 54 representing the week of the year for a given date. |
| Date.Year | Extracts the year part from a specified date. |
Creation and Conversion Functions
| Function | Description |
|---|---|
| #date | Creates a date value from whole numbers representing the year, month, and day. |
| Date.From | Creates a date from the given value. |
| Date.FromText | Creates a Date from local, universal, and custom Date formats. |
| Date.ToRecord | Returns a record containing parts of the date value. |
| Date.ToText | Returns a textual representation of the date value. |
Date Modification Functions
| Function | Description |
|---|---|
| Date.AddDays | Increments the date by the provided number of days. |
| Date.AddMonths | Increments the date by the provided number of months. |
| Date.AddQuarters | Increments the date by the provided number of quarters. |
| Date.AddWeeks | Increments the date by the provided number of weeks. |
| Date.AddYears | Increments the date by the provided number of years. |
Information Functions
| Function | Description |
|---|---|
| Date.IsInCurrentDay | Checks if the specified date is during the current day. |
| Date.IsInCurrentMonth | Checks if the specified date is during the current month. |
| Date.IsInCurrentQuarter | Checks if the specified date is during the current quarter. |
| Date.IsInCurrentWeek | Checks if the specified date is during the current week. |
| Date.IsInCurrentYear | Checks if the specified date is during the current year. |
| Date.IsInNextDay | Checks if the specified date is during the next day |
| Date.IsInNextMonth | Checks if the specified date is during the next month |
| Date.IsInNextNDays | Checks if the specified date is during the next number of days |
| Date.IsInNextNMonths | Checks if the specified date is during the next number of months |
| Date.IsInNextNQuarters | Checks if the specified date is during the next number of quarters |
| Date.IsInNextNWeeks | Checks if the specified date is during the next number of weeks |
| Date.IsInNextNYears | Indicates whether this date occurs during the next number of years |
| Date.IsInNextQuarter | Checks if the specified date is during the next quarter |
| Date.IsInNextWeek | Checks if the specified date is during the next week |
| Date.IsInNextYear | Checks if the specified date is during the next year |
| Date.IsInPreviousDay | Checks if the specified date is during the previous day |
| Date.IsInPreviousMonth | Checks if the specified date is during the previous month |
| Date.IsInPreviousNDays | Checks if the specified date is during the previous number of days |
| Date.IsInPreviousNMonths | Checks if the specified date is during the previous number of months |
| Date.IsInPreviousNQuarters | Checks if the specified date is during the previous number of quarters |
| Date.IsInPreviousNWeeks | Checks if the specified date is during the previous number of weeks |
| Date.IsInPreviousNYears | Checks if the specified date is during the previous number of years |
| Date.IsInPreviousQuarter | Checks if the specified date is during the previous quarter |
| Date.IsInPreviousWeek | Checks if the specified date is during the previous week |
| Date.IsInPreviousYear | Checks if the specified date is during the previous year |
| Date.IsInYearToDate | Checks if the specified date is during the current year and is on or before the current day. |
| Date.IsLeapYear | Checks if the specified date falls in a leap year. |
Start-End Functions
| Function | Description |
|---|---|
| Date.EndOfDay | Returns the end of the day. |
| Date.EndOfMonth | Returns the end of the month. |
| Date.EndOfQuarter | Returns the end of the quarter. |
| Date.EndOfWeek | Returns the end of the week. |
| Date.EndOfYear | Returns the end of the year. |
| Date.StartOfDay | Returns the start of the day. |
| Date.StartOfMonth | Returns the start of the month. |
| Date.StartOfQuarter | Returns the start of the quarter. |
| Date.StartOfWeek | Returns the start of the week. |
| Date.StartOfYear | Returns the start of the year. |
2023-2026 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy