Is there any way to take the difference between two datetime in sql server?
datetime
For example, my dates are
2010-01-22 15:29:55.090
SELECT DATEDIFF(day, '2010-01-22 15:29:55.090', '2010-01-22 15:30:09.153')
Replace day with other units you want to get the difference in, like second, minute etc.
day
second
minute