How does the DAY function (DAX) work?
The DAY function (DAX) returns the day of the month, a number from 1 to 31.
DAY Formula Syntax
How do you use the DAY function?
The DAY function is used to extract a day number from a date into a cell. You can also use the DAY function to extract a value into another function.
Related Blog Posts
Related Support Forum Posts
Considerations when using the DAY function
The DAY function takes as an argument the date of the day you are trying to find. Dates can be provided to the function by using another date function, by using an expression that returns a date, or by typing a date in a datetime format. You can also type a date in one of the accepted string formats for dates.
Values returned by the YEAR, MONTH and DAY functions will be Gregorian values regardless of the display format for the supplied date value. For example, if the display format of the supplied date is Hijri, the returned values for the YEAR, MONTH and DAY functions will be values associated with the equivalent Gregorian date.
When the date argument is a text representation of the date, the day function uses the locale and date/time settings of the client computer to understand the text value in order to perform the conversion. If the current date/time settings represent dates in the format of Month/Day/Year, then the string, “1/8/2009”, is interpreted as a datetime value equivalent to January 8th of 2009, and the function returns 8. However, if the current date/time settings represent dates in the format of Day/Month/Year, the same string would be interpreted as a datetime value equivalent to August 1st of 2009, and the function returns 1.
Related Video Tutorials
Formula examples using the DAY function
=DAY(“3-4-1007”) =DAY(“March 4 2007”)