Mega Code Archive

 
Categories / MSSQL / Date Timezone
 

DATEPART

45> -- DATEPART: return part of a date as an integer value. 46> 47> -- DATEPART(part_of_the_date_to_return, the_date) 48> 49> SELECT DATEPART(dw,GETDATE()) 50> GO -----------           5 (1 rows affected)