DateAdd


 

DateAdd>date,interval,amount,result

 

Adds (or subtracts) a number of days, weeks, months or years to (or from) a date.

Interval can take one of the following values:

 

D: Days

W: Weeks

M: Months

Y: Years

 

Amount can be a positive or negative amount to apply to the date.

 

The date must be in local system format. Use DateLocal to generate a date in local system format.

 

See also: DateDiff, DateLocal, DatePart

 

Examples

 

GetDate>today

DateAdd>today,D,-1,yesterday

DateAdd>today,M,1,NextMonth

DateAdd>today,W,-1,LastWeek

DateAdd>today,Y,-2,TwoYearsAgo