DateAdd, DateDiff, and DatePart Functions - SQL Server

Syntax

FunctionSyntaxNotes
DateAddDATEADD(datepart, number, date) 
DateDiffDATEDIFF(datepart, startdate, enddate) 
DatePartDATEPART(datepart, date) 

DatePart Argument

Datepart Abbreviation Functions
day dd, d All functions
dayofyear dy, y All functions
hour hh All functions
ISO_WEEK isowk, isoww New to SQL Server 2008 DatePart function
microsecond mcs New to all SQL Server 2008 functions
millisecond ms All functions
minute mi, n All functions
month mm, m All functions
nanosecond ns New to all SQL Server 2008 functions
quarter qq, q All functions
second ss, s All functions
TZoffset tz New to SQL Server 2008 DatePart function
week wk, ww All functions
weekday dw, w DateAdd and Date Part
year yy, yyyy All functions