Date.Day is a function in the Power Query M language that returns the day component of a date, datetime, or datetimezone value.
Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365
Syntax
Date.Day( dateTime as any ) as nullable number
Description
Returns the day component of a date
, datetime
, or datetimezone
value.
dateTime
: Adate
,datetime
, ordatetimezone
value from which the day component is extracted.
Examples
Get the day component of a date
, datetime
, or datetimezone
value representing the date and time of 5/14/2011 05:00:00 PM.
// Output: 14
Date.Day( #datetime( 2011, 5, 14, 17, 0, 0 ) )
Related articles
Learn more about Date.Day 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.Day are:
- Date.DayOfWeek
- Date.DayOfYear
- Date.DaysInMonth
- Date.Month
- Date.QuarterOfYear
- Date.WeekOfMonth
- Date.WeekOfYear
- Date.Year
