The AddYears function is a built-in function that adds n years to dt and returns a valid date and time.

Input parameters

dt: Date Time Type

n: Integer Type

Output parameters

Date Time Type

Examples

Usage

Result

AddYears( #2001-09-14#, 3 )

#2004-09-14 00:00:00#

AddYears( #2004-02-29#, 1 )

#2005-02-28 00:00:00#

AddYears( #2004-02-29#, 4 )

#2008-02-29 00:00:00#

See Also

Available Data and Time Functions | Available Built-in Functions