add-years-to-date

Adds the specified number of years to a given date.

Syntax

    add-years-to-date(strDate1, years)

Parameters

strDate1 is a string that represents the date and is specified in the format yyyy-mm-dd . For more information about date and time parameters, see Date and time parameters .

years is a number that holds the number of years to add to the given date and time. A negative number for years subtracts years from the given date.

Returns

A string value in the format yyyy-mm-ddThh:mm:ssZ .

Example

The following expression returns a string value of 2001-11-28 :

add-years-to-date("1999-11-28",2)