日期部分 | 缩写 |
---|---|
Year | yy, yyyy |
quarter | qq, q |
Month | mm, m |
dayofyear | dy, y |
Day | dd, d |
Week | wk, ww |
Hour | hh |
minute | mi, n |
second | ss, s |
millisecond | ms |
DATEADD ( datepart , number, date )
DATEDIFF (datepart ,date1,date2)
DATEPART (datepart ,date)
DATENAME (datepart,date)