Documentation/Calc Functions/EDATE

Function name:
EDATE

Category:
Date and Time

Summary:
Calculates the date that is on the same day of the month but a specified number of months before or after a given date. EDATE can be used to determine different types of end / due date.

Syntax:
EDATE(StartDate; Months)

Returns:
Returns an integer date-time serial number which represents the new date. The returned value is formatted as a number by default, but you can apply other formats as needed.

Arguments:
StartDate is the date (in quotation marks) or a date-time serial number, or a reference to the cell containing one of those types, which is the start date for which the calculation is to be carried out.

Months is an integer value or a reference to a cell containing that value, which is the number of months to be added to StartDate. Positive, zero, and negative values are accepted. Negative values result in dates that are earlier than StartDate, while positive values result in dates that are later than StartDate.


 * If StartDate does not contain a valid date expression, then EDATE reports a #VALUE! error.
 * EDATE ignores any time components of StartDate.
 * The default is for the day of the month to remain unchanged, unless it is greater than the number of days in the new month, in which case it is reset to the last day of the new month.
 * If Months is non-numeric, then EDATE reports a #VALUE! error.
 * If Months is a non-integer value, then EDATE truncates it to an integer.

Related LibreOffice functions:
DAYS

DATEDIF

EOMONTH

ODF standard:
Section 6.10.8, part 2

Equivalent Excel functions:
EDATE