Http://msdn2.microsoft.com/zh-cn/library/ms174420.aspx
Zookeeper is as follows:
DATEPART (datepart, date)
| Date |
Abbreviations |
Year |
Yy,Yyyy |
Quarter |
Qq,Q |
Month |
Mm,M |
Dayofyear |
Dy,Y |
Day |
Dd,D |
Week |
Wk,Ww |
Weekday |
Dw |
Hour |
Hh |
Minute |
Mi,N |
Second |
Ss,S |
Millisecond |
MS |
Week(Wk,Ww) The date part reflects the changes made to set datefirst. The year January 1 of any year is defined.WeekStart Number of the date part, for example, DATEPART (Wk, 'Jan 1,Xxxx') = 1, where,XxxxIt is any year.
Weekday(Dw) The date part returns the number corresponding to a day of the week, for example, Sunday = 1, Saturday = 7.WeekdayThe number generated in the date part depends on the value SET by set datefirst. Set the first day of the week.
The actual usage is as follows:
Update time set the_year = year (the_date), the_month = month (the_date ),
The_quarter = DATEPART (qq, the_date), the_week = DATEPART (wk, the_date), the_day = day (the_date)