Definition
The DATEADD() function adds a time/date interval to a date and then returns the date.
Syntax
DATEADD(interval, number, date)
where interval is required and it is the time/date interval to add. This can be one of the following values:
year, yyyy, yy = Year
quarter, qq, q = Quarter
month, mm, m = month
dayofyear, dy, y = Day of the year
day, dd, d = Day of the month
week, ww, wk = Week
weekday, dw, w = Weekday
hour, hh = hour
minute, mi, n = Minute
second, ss, s = Second
millisecond, ms = Millisecond
And number is required and is the number of interval to add to date. This can be positive to get dates in the future or negative to get dates in the past.
And date is required and is the date that will be modified.
Example(s)
See how DATEADD can be used to: