Date.Month is a Power Query M function that returns the month belonging to the provided date(time) value.
Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365
Syntax
Date.Month( dateTime as any ) as nullable number
Description
Returns the month component of the provided datetime
value, dateTime
.
Examples
Find the month in #datetime( 2011, 12, 31, 9, 15, 36 ).
// Output: 12
Date.Month( #datetime( 2011, 12, 31, 9, 15, 36 ) )
Related articles
Learn more about Date.Month in the following articles:
- Create Date Table or Calendar in Power Query M
Learn how to create a dynamic calendar table in Power Query’s M language. Build your custom columns and claim your free Date Table Script. » Read more
Related functions
Other functions related to Date.Month are:
- Date.Day
- Date.DayOfWeek
- Date.DayOfYear
- Date.DaysInMonth
- Date.QuarterOfYear
- Date.WeekOfMonth
- Date.WeekOfYear
- Date.Year
