ํ‹ฐ์Šคํ† ๋ฆฌ ๋ทฐ

MS-SQL

mssql dateadd

๐Ÿ”ฅ fire 2014. 1. 24. 14:37
dateadd(year, 1, UpdateDate)

datepart Abbreviation
year yy, yyyy
quarter qq, q
month mm, m
dayofyear dy, y
day dd, d
week wk, ww
weekday dw, w
hour hh
minute mi, n
second ss, s
millisecond ms
microsecond mcs
nanosecond ns

 

์˜ˆ)

SELECT OrderId,DATEADD(day,45,OrderDate) AS OrderPayDate
FROM Orders

 

๋Œ“๊ธ€