[MSSQL] DATEDIFF ( datepart , startdate , enddate )

2014. 8. 29. 09:52EXPERIENCE/DB | MSsql

반응형
DATEDIFF ( datepart , startdate , enddate )

Return Type int

 

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

microsecond

mcs

nanosecond

ns

 

http://msdn.microsoft.com/en-us/library/ms189794.aspx

 

DATEDIFF (Transact-SQL) - SQL Server

DATEDIFF (Transact-SQL) In this article --> APPLIES TO: SQL Server Azure SQL Database Azure SQL Data Warehouse Parallel Data Warehouse This function returns the count (as a signed integer value) of the specified datepart boundaries crossed between the spec

docs.microsoft.com

 

반응형

'EXPERIENCE > DB | MSsql' 카테고리의 다른 글

[MSSQL] AUTOINCREMENT 설정하기  (742) 2013.10.17
MS-SQL DATETIME CONVERT  (379) 2013.08.29
MSSQL AUTO INCREMENT INIT  (379) 2013.07.04
[MSSQL] Database 복원  (0) 2013.05.07