- DAX Functions Tutorial
- DAX Functions - Home
- DAX Functions - Introduction
- DAX Parameter Naming Conventions
- Description Structure
- DAX Functions - Aggregation
- DAX Functions - Filter
- DAX Functions - Time Intelligence
- DAX Functions - Date and Time
- DAX Functions - Information
- DAX Functions - Logical
- Math & Trigonometric Functions
- DAX Functions - Parent & Child
- DAX Functions - Statistical
- DAX Functions - Text
- DAX Functions - Other
- DAX Functions Useful Resources
- DAX Functions - Quick Guide
- DAX Functions - Useful Resources
- DAX Functions - Discussion
DAX Date & Time - EDATE function
Description
Returns the date that is the indicated number of months before or after the start date.
Syntax
EDATE (<start_date>, <month>)
Parameters
Sr.No. | Parameter & Description |
---|---|
1 |
start_date A date that represents the start date. It can be in datetime or text format. |
2 |
months An integer that represents the number of months before or after start_date. If months is not an integer, it is truncated. |
Return Value
A date in datetime format.
Remarks
You can use EDATE to calculate maturity dates or due dates that fall on the same day of the month as the date of issue.
DAX works with dates in datetime format. Dates stored in other formats are converted implicitly.
If start_date is not a valid date, EDATE returns an error value.
Make sure that the column reference or date that you supply as the first parameter is a date.
DAX EDATE function uses the locale and date/time settings of the client computer to understand the text value in order to perform the conversion. For example,
If the current date/time settings represent dates in the format of Month/Day/Year, then the string, "1/8/2016" is understood as a datetime value equivalent to 8th January, 2016.
If the current date/time settings represent dates in the format of Day/Month/Year, the same string would be understood as a datetime value equivalent to 1st August, 2016.
Example
= EDATE (DATE (2015,1,1),9) returns 10/1/2015 12:00:00 AM = EDATE (DATE (2015,1,30),1) returns 2/28/2015 12:00:00 AM = EDATE (DATE (2015,1,29),1) returns 2/28/2015 12:00:00 AM