Mega Code Archive

 
Categories / MSSQL Tutorial / Date Functions
 

Select DATENAME(year, 2002-09-30 11

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