EDATE returns aserial number corresponding to a date.
To display the result as a date, apply anumber format of your choice.
The EDATE function takes twoarguments,start_dateandmonths:
Note: The EDATE function returns thesameday of the month.
If you want to get thelastday of a month, use theEOMONTH function.
We can do this with the following formulas:
The first formula does not change the date sincemonthsis zero.
In all cases, EDATE returns the 1st of the month since the start date is also the 1st.
Of course, in most real-life scenarios, you will not hardcode dates into formulas like this.
You will instead use cell references.
And if the date in A1 is changed, EDATE will generate new dates.
you might use negative numbers for months to create dates before the start date.
This approach is seen in the worksheet below, where EDATE appears in the last argument.
For a detailed explanation and to download the workbook,see this page.
In the worksheet below, the start date is in cell B5.
For a more detailed explanation, seeSequence of months.
This happens because EDATE only works with whole numbers.
End-of-month dates
EDATE is clever about “end of month” dates when the day is 31.
For example:
If you need an end-of-month date, switch to theEOMONTH function.
See below for more examples of formulas that use the EDATE function.