This function will add a specified number of years to a date.

 

Syntax

 

ADDYEARS((x), y)

 

Parameters

 

x = a date. This is the date you wish to use to add years to, preferred format of YYYY,MM,DD such as 2019, 8, 22 for 22nd of August 2019. This can also be the name of a date attribute.

 

y = the number, either positive or negative, of years you wish to add to the date (x)

 

Type of Data Returned

 

A date will be returned.

 

Examples

 

ADDYEARS((2019, 8, 22), 8) will return 22nd of August 2027

 

ADDYEARS((2019, 8, 22), 10) will return 22nd of August 2029.

 

ADDYEARS((2019, 8, 22), -3) will return 22nd of August 2016.