DAY DAX Function (Date and Time)

Returns a number from 1 to 31 representing the day of the month.

Syntax

DAY ( <Date> )
Parameter Attributes Description
Date

A date in datetime format.

Return values

Scalar A single integer value.

An integer number indicating the day of the month.

Remarks

If the argument is a string, it is translated into a datetime value using the same rules applied by the DATEVALUE function.

If the argument is a number, DAY converts it to a datetime value. The integer part of the number is the number of days after December 30, 1899. For example, DAY ( 45000 ) returns 15, because 45000 is March 15, 2023.

The result is always the day of the Gregorian calendar. The display format of the date does not change the result. For example, with a Hijri display format, DAY returns the day of the equivalent Gregorian date.

If the argument is BLANK, DAY returns BLANK.

» 1 related article
» 3 related functions

Examples

--  Extract date parts from a date
EVALUATE
ADDCOLUMNS (
    SAMPLE ( 10, VALUES ( 'Date'[Date] ), 'Date'[Date], ASC ),
    "Year",    YEAR    ( 'Date'[Date] ),     
    "Quarter", QUARTER ( 'Date'[Date] ),
    "Month",   MONTH   ( 'Date'[Date] ),    
    "Day",     DAY     ( 'Date'[Date] )         
)
ORDER BY 'Date'[Date]
Date Year Quarter Month Day
2005-01-01 2,005 1 1 1
2005-10-12 2,005 4 10 12
2006-07-23 2,006 3 7 23
2007-05-03 2,007 2 5 3
2008-02-11 2,008 1 2 11
2008-11-20 2,008 4 11 20
2009-08-31 2,009 3 8 31
2010-06-11 2,010 2 6 11
2011-03-22 2,011 1 3 22
2011-12-31 2,011 4 12 31

Related articles

Learn more about DAY in the following articles:

Related functions

Other related functions are:

Last update: Nov 11, 2026   » Contribute   » Show contributors

Contributors: Alberto Ferrari, Marco Russo

Microsoft documentation: https://learn.microsoft.com/en-us/dax/day-function-dax

2018-2026 © SQLBI. All rights are reserved. Information coming from Microsoft documentation is property of Microsoft Corp. » Contact us   » Privacy Policy & Cookies

Context Transition

This function performs a Context Transition if called in a Row Context. Click to read more.

Row Context

This expression is executed in a Row Context. Click to read more.

Passed by Expression

This parameter is passed by expression and can be evaluated multiple times in different evaluation contexts.

Iterator

Not recommended

The use of this function is not recommended. See Remarks and Related functions for alternatives.

Not recommended

The use of this parameter is not recommended.

Deprecated

This function is deprecated. Jump to the Alternatives section to see the function to use.

Volatile

A volatile function may return a different result every time you call it, even if you provide the same arguments. Click to read more.

Deprecated

This parameter is deprecated and its use is not recommended.

DirectQuery compatibility

Limitations are placed on DAX expressions allowed in measures and calculated columns.
The state below shows the DirectQuery compatibility of the DAX function.

Contribute

Want to improve the content of DAY? Did you find any issue?
Please, report it us! All submissions will be evaluated for possible updates of the content.