EDATE (Date, Months) EDATE (Date; Months)

Date

Temporal Temporal

The original date.

Months

Number Number

The number of months to set back or advance the original date. A positive number advances the original date and a negative number sets it back.

Returns

Temporal Temporal

A date advanced or set back a number of months relative to a given date. If the day of the month does not exist in the resulting month, the last day of that month is returned.

Returns a date advanced or set back a number of months.

Examples

EDATE ( DATE (1981, 5, 1), 24)
EDATE ( DATE (1981; 5; 1); 24)

Returns a date representing May 1, 1983 (May 1, 1981, advanced 24 months).

EDATE ( DATE (1981, 5, 1), - 24)
EDATE ( DATE (1981; 5; 1); - 24)

Returns a date representing May 1, 1979 (May 1, 1981, set back 24 months).

EDATE ( DATE (1981, 5, 1), { 24, - 24 })
EDATE ( DATE (1981; 5; 1); { 24; - 24 })

Returns an array of dates: May 1, 1983 (May 1, 1981, advanced 24 months) and May 1, 1979 (May 1, 1981, set back 24 months).

EDATE ( DATE (2024, 1, 31), 1)
EDATE ( DATE (2024; 1; 31); 1)

Returns a date representing February 29, 2024, the last day of the month following January 2024.

fxEngine Shell Want this in your own terminal? A standalone version is coming. Get notified.
Loading fxEngine Shell