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
반응형
'Database > MSsql' 카테고리의 다른 글
[MSSQL] AUTOINCREMENT 설정하기 (739) | 2013.10.17 |
---|---|
MS-SQL DATETIME CONVERT (59) | 2013.08.29 |
MSSQL AUTO INCREMENT INIT (57) | 2013.07.04 |
[MSSQL] Database 복원 (0) | 2013.05.07 |