DATE Function (DAX)

How does the DATE function (DAX) work?

The DATE function (DAX) returns the specified date in datetime format.

DATE Formula Syntax

DATE(
     <year>, <month>, <day>
)

How do you use the DATE function?

The DATE function is most useful in situations where the year, month, and day are supplied by formulas. For example, the underlying data might contain dates in a format that is not recognized as a date, such as YYYYMMDD. You can use the DATE function in conjunction with other functions to convert the dates to a number that can be recognized as a date.

Related Blog Posts

Related Support Forum Posts

Chart x-axis displayed upon date range slicer
Cumulative total for current week, current month and current Year
Limit date picker (date slicer) to only dates available in my dataset

Considerations when using the DATE function

The DATE function takes the integers that are input as arguments, and generates the corresponding date.

In contrast to Microsoft Excel, which stores dates as a serial number, DAX date functions always return a datetime data type. However, you can use formatting to display dates as serial numbers if you want.

This DAX function may return different results when used in a model that is deployed and then queried in DirectQuery mode.

Related Video Tutorials

Formula examples using the DATE function

=DATE(2009,7,8)

=DATE(08,1,2)

=DATE(2008,1,2)

Related DAX Functions

Related Course Modules

Ultimate-Beginners-Guide-To-PowerBI
Center of Excellence

DOWNLOAD


Download our comprehensive DAX Formula Reference Guide as perfect companion as you learn how to use DAX formulas within Power BI.


Download DAX Formulas Reference Guide
Download DAX Formula Reference Guide
Membership