Mega Code Archive

 
Categories / MSSQL Tutorial / Date Functions
 

Select DATEPART(year, 2002-09-30 11

2>  select DATEPART(year, '2002-09-30 11:35:00') 3> GO -----------        2002 (1 rows affected)