Skip to main content
Adds a specified number of months to the date, accurate to the month. The add_months function provides similar functionalities.

Syntax

Parameters

  • expr1: the start time. It must be of the DATETIME or DATE type.
  • expr2: the months to add. It must be of the INT type. It can be greater, equal, or less than zero. A negative value subtracts months from date.

Return value

Returns a DATETIME value.

Examples