definition:
The DATEADD () function plus the date specified in the time interval.
※ specified time interval can be negative
grammar:
DATEADD(datepart,number,date)
parameter:
① the datepart of a parameter can be the following values:
datepart | abbreviation |
---|---|
year | yy, yyyy |
Quarter | qq, q |
month | mm, m |
On the day | house, the |
day | dd, d |
week | wk, ww |
week | dw, w |
hour | hh |
minute | me n |
second | ss, s |
millisecond | ms |
subtle | mcs |
Ns | ns |
② Number The is the time interval you want to add. Can be positive, it can be negative.
③ DATE parameter is valid date expression.
Example: