|
DateAdd(datepart, number, date)
datepart
One of the following strings:
yyyy -- Year
q -- Quarter
m -- Month
y -- Day of year
d -- Day
w -- Weekday
ww -- Week
h -- Hour
n -- Minute
s -- Second
number
Number of units of datepart to add to date (positive to get dates in the future or negative to get dates in the past).
date
Date/time object in the period from 100 AD to 9999 AD.
|
|
|
The datepart specifiers "y," "d," and "w" perform the same function -- add a certain number of days to a given date.
When passing a date/time value as a string, make sure it is enclosed in quotes. Otherwise, it is interpreted as a number representation of a date/time object, returning undesired results.
|
|