Programming/Database
How to get time between two dates in sql
역시인생한방
2016. 4. 27. 12:52
참조 : https://msdn.microsoft.com/en-us/library/ms189794.aspx
DATEDIFF(datepart, startdate, enddate) 를 이용한다
ex)
DATEDIFF(s, '2016-04-27 12:00:00', '2016-04-27 12:00:30')
은 30을 리턴한다