Description
Returns the serial number date for the last day of the month that is the indicated number of months before or after StartDate.
Syntax
EOMONTH ( StartDate, months )
Parameter | Description |
---|---|
StartDate | A date that represents the start date. |
months | The number of months before or after StartDate. A positive value for months yields a future date; a negative value yields a past date. |
Remarks
Use EOMONTH to calculate maturity dates or due dates that fall on the last day of the month. If StartDate is not a valid date, EOMONTH returns the #NUM! error value. If months is not an integer, it is truncated. If StartDate plus months yields an invalid date, EOMONTH returns the #NUM! error value.
Examples
EOMONTH (DATEVALUE("01/01/13"), 1 ) equals 41333 or 2/28/2013
EOMONTH (DATEVALUE("01/01/14"),-6) equals 41486 or 7/31/2013
Use the TEXT function to convert the serial number back into a date format. For example:
TEXT (EOMONTH(DATEVALUE("01/01/14"),3), "MM/DD/YYYY") returns "4/30/2014".
See also