Formualizer Docs

EDATE

Returns the serial date offset by a whole number of months from a start date.

The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.

Syntax

=EDATE(start_date, months)

Arguments

ArgumentTypeRequiredDefault
start_datenumberRequired—
monthsnumberRequired—

Remarks

  • A date argument may be text holding a date or time ("10/26/1999", "1999-10-26 14:05"), read as its serial; text that is neither a number nor a date returns #VALUE!.
  • months is truncated to an integer before calculation.
  • If the target month has fewer days, the day is clamped to that month's last valid day.
  • Serials are interpreted and emitted with the workbook's date system (Excel 1900 or Excel 1904).

Examples

Move forward one month from January 31 into leap-year February.

Formula =EDATE(DATE(2024,1,31),1)

Expected result 45351

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Use a negative month offset to go backward.

Formula =EDATE(DATE(2024,3,15),-1)

Expected result 45337

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Apply a zero-month offset in the middle of February.

Formula =EDATE(DATE(2024,2,15),0)

Expected result 45337

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

The month offset must be numeric.

Formula =EDATE(DATE(2024,2,15),"one")

Expected result #VALUE!

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Add months to first-of-month date

Formula =EDATE(44927, 3)

Expected result 45017

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Clamp month-end overflow

Formula =EDATE(45322, 1)

Expected result 45351

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

FAQ

What happens when the start day does not exist in the target month?

EDATE clamps to the last valid day of the target month (for example Jan 31 + 1 month becomes Feb month-end).

Implementation

Engine source

On this page