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

Date.AddMonths

Owen Duncan|Last Updated: 4/19/2018

About

Returns a DateTime value with the month portion incremented by n months.

Date.AddMonths(dateTime as datetime, numberOfMonths as number) as nullable datetime  

Arguments

ArgumentDescription
dateTimeThe DateTime to add months to.
numberOfMonthsThe number of months to add.

Remarks

  • It also handles incrementing the year portion of the value as appropriate.

Examples

Date.AddMonths(DateTime.FromText("2011-02-19"), 5) equals 2011-07-19  
Date.AddMonths(DateTime.FromText("2010-12-01"), 2) equals 2011-02-01  
© 2018 Microsoft