addMonths

Return the sum of a date value and a specified number of months.

Example

Add 3 months to the dates in SalesAcme.Sales.TIMEID.

addMonths(Sales_Acme.Sales.TIME_ID, 3)

Syntax

addMonths(date expr d, int mos)
  • d : date to add months to
  • mos : int months to add to d

    Returns

    date

Notes

Adds an integer number (+/-) of months to a date given in the format “yyyy-MM-dd”, and returns the final date as a result.


© Incorta, Inc. All Rights Reserved.