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

Date.AddDays

Owen Duncan|Last Updated: 10/5/2018
|
1 Contributor

About

Returns a Date/DateTime/DateTimeZone value with the day portion incremented by the number of days provided. It also handles incrementing the month and year potions of the value as appropriate.

Date.AddDays(dateTime, days as number)  

Arguments

ArgumentDescription
dateTimeThe DateTime to add days to.
daysThe number of days to add.

Examples

Date.AddDays(DateTime.FromText("2011-02-19"), 5) equals 2011-02-24  
Date.AddDays(DateTime.FromText("2011-02-19"), -2) equals 2011-02-17  
Date.AddDays(DateTime.FromText("2011-12-31"), 1) equals 2012-01-01  
© 2018 Microsoft