Table of contents
TOC
Collapse the table of content
Expand the table of content

Date.AddYears

Owen Duncan|Last Updated: 4/19/2018

About

Returns a DateTime value with the year portion incremented by n years.

Date.AddYears(dateTime as datetime, years as number) as datetime  

Arguments

ArgumentDescription
dateTimeThe DateTime to add years to.
yearsThe number of years to add.

Example

Date.AddYears(DateTime.FromText("2011-02-19"), 10) equals 2021-02-19  
© 2018 Microsoft