EDATE DAX Function (Date and Time)

Returns the date that is the indicated number of months before or after the start date.

Syntax

EDATE ( <StartDate>, <Months> )
Parameter Attributes Description
StartDate

A date in datetime format that represents the start date.

Months

The number of months before or after start_date.

Return values

Scalar A single datetime value.

The date that is Months before or after StartDate. The time part is always 12:00 AM.

Remarks

EDATE adds a number of months to a date. The result has the same day of the month as StartDate. If that day does not exist in the result month, EDATE returns the last day of the result month. For example, EDATE ( DATE ( 2009, 1, 31 ), 1 ) returns February 28, 2009. In a leap year, EDATE ( DATE ( 2008, 1, 31 ), 1 ) returns February 29, 2008.

Months can be a negative number, to go back in time. If Months has a decimal part, EDATE rounds it to the nearest integer. A value of 0.5 is rounded away from zero: 1.4 becomes 1, 1.5 and 1.9 become 2, and -1.9 becomes -2. If Months is BLANK, EDATE uses zero.

StartDate can be a datetime value or a text that DAX can convert to a date. For a text value, DAX uses the locale and the date settings of the client, so the same text can give different dates on different computers. For example, the text “1/8/2009” is January 8, 2009 with a month/day/year setting and August 1, 2009 with a day/month/year setting. If StartDate is BLANK, the result is BLANK. If StartDate is not a valid date, or if the result is after December 31, 9999, EDATE returns an error.

The result is a date. The time part is always 12:00 AM, also when StartDate has a time part.

This function is not supported in DirectQuery mode when used in calculated columns or row-level security (RLS) rules.

» 1 related article
» 1 related function

Examples

--  EDATE adds months to a date, 
--  EOMONTH does the same, and it also goes at the end of the month
EVALUATE
ADDCOLUMNS (
    TOPN ( 10, VALUES ( 'Date'[Date] ), 'Date'[Date], ASC ),
    "EDATE, +1", EDATE ( 'Date'[Date], +1 ),
    "EDATE, -1", EDATE ( 'Date'[Date], -1 ),
    "EOMONTH, 0", EOMONTH ( 'Date'[Date], 0 ),
    "EOMONTH, +1", EOMONTH ( 'Date'[Date], +1 ),
    "EOMONTH, -1", EOMONTH ( 'Date'[Date], -1 )
)
ORDER BY 'Date'[Date]
Date EDATE, +1 EDATE, -1 EOMONTH, 0 EOMONTH, +1 EOMONTH, -1
2005-01-01 2005-02-01 2004-12-01 2005-01-31 2005-02-28 2004-12-31
2005-01-02 2005-02-02 2004-12-02 2005-01-31 2005-02-28 2004-12-31
2005-01-03 2005-02-03 2004-12-03 2005-01-31 2005-02-28 2004-12-31
2005-01-04 2005-02-04 2004-12-04 2005-01-31 2005-02-28 2004-12-31
2005-01-05 2005-02-05 2004-12-05 2005-01-31 2005-02-28 2004-12-31
2005-01-06 2005-02-06 2004-12-06 2005-01-31 2005-02-28 2004-12-31
2005-01-07 2005-02-07 2004-12-07 2005-01-31 2005-02-28 2004-12-31
2005-01-08 2005-02-08 2004-12-08 2005-01-31 2005-02-28 2004-12-31
2005-01-09 2005-02-09 2004-12-09 2005-01-31 2005-02-28 2004-12-31
2005-01-10 2005-02-10 2004-12-10 2005-01-31 2005-02-28 2004-12-31
--  If the day does not exist in the result month,
--  EDATE returns the last day of that month.
--  Months is rounded to the nearest integer: 1.9 becomes 2.
EVALUATE
ADDCOLUMNS (
    SELECTCOLUMNS (
        { DATE ( 2008, 1, 31 ), DATE ( 2009, 1, 31 ), DATE ( 2009, 3, 31 ) },
        "StartDate", [Value]
    ),
    "Months +1", EDATE ( [StartDate], 1 ),
    "Months -1", EDATE ( [StartDate], -1 ),
    "Months +1.9", EDATE ( [StartDate], 1.9 )
)
StartDate Months +1 Months -1 Months +1.9
2008-01-31 2008-02-29 2007-12-31 2008-03-31
2009-01-31 2009-02-28 2008-12-31 2009-03-31
2009-03-31 2009-04-30 2009-02-28 2009-05-31

Related articles

Learn more about EDATE in the following articles:

Related functions

Other related functions are:

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

Contributors: Alberto Ferrari, Marco Russo

Microsoft documentation: https://learn.microsoft.com/en-us/dax/edate-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 EDATE? Did you find any issue?
Please, report it us! All submissions will be evaluated for possible updates of the content.