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

Date.AddWeeks

Owen Duncan|Last Updated: 4/19/2018

About

Returns a Date/DateTime/DateTimeZone value incremented by the number of weeks provided. Each week is defined as a duration of seven days. It also handles incrementing the month and year potions of the value as appropriate.

Date.AddWeeks(dateTime, weeks as number)  

Arguments

ArgumentDescription
dateTimeThe DateTime to add weeks to.
weeksThe number of weeks to add.

Examples

Date.AddWeeks(DateTime.FromText("2011-02-19"), 1) equals 2011-02-26  
Date.AddWeeks(DateTime.FromText("2011-02-19"), -2) equals 2011-02-05  
Date.AddWeeks(DateTime.FromText("2011-12-31"), 1) equals 2012-01-07  
© 2018 Microsoft