You are viewing content for 5.1 | 5.0 | 4.9 | 4.8 | 4.7 | 4.6 | 4.5 | 4.4 | 4.3 | Previous Releases


addYears

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

Example

Add 1 year to the dates in SalesAcme.Sales.TIMEID.

addYears(Sales_Acme.Sales.TIME_ID, 1)

Syntax

addYears(date expr d, int y)
  • d : date to add time to
  • y : int years to add to d

    Returns

    date

Notes

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

See Also

addMonths, addMilliseconds, addSeconds


© Incorta, Inc. All Rights Reserved.