DatePart( datepart, date_time_value )
Returns the datepart of a date/time value as an integer.
Example
select DatePart( month, ‘27 sep 2011’ ) -- returns 9
Differences
MS SQL Server does not support the dateparts CalWeekOfYear
, CalDayOfWeek
and CalYearOfWeek
.