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
Please check below trick to find the date difference between two dates
DATEDIFF(DAY,ordr.DocDate,RDR1.U_ProgDate) datedifff
where you can change according your requirement as you want difference of days or month or year or time.