DATEDIFF function in SQL Server

Sunday, 4 December 2011

DATEDIFF function in SQL Server


Synatx

DATEDIFF ( datepart , startdate , enddate )

Argument

Datepart-  Abbreviations

year- yy, yyyy

quarter- qq, q

month- mm, m

dayofyear- dy, y

day- dd, d

week- wk, ww

Hour - hh

minute- mi, n

second- ss, s

millisecond- ms

Return type

integer


No comments:

Post a comment