You don't really need DATEDIFF for this. This code will return the ResponseTime as an offset from 1900-01-01 00:00:00, which is the standard way to store an elapsed time in SQL Server.select ResponseTime = HistoryFirstResponse-TicketOpenDateTime, TicketOpenDateTime, HistoryFirstResponsefrom ( -- Test Data select TicketOpenDateTime = convert(datetime,'20090917 07:13:24.347'), HistoryFirstResponse = convert(datetime,'20090918 14:11:17.883') ) a
Results:ResponseTime TicketOpenDateTime HistoryFirstResponse----------------------- ----------------------- -----------------------1900-01-02 06:57:53.537 2009-09-17 07:13:24.347 2009-09-18 14:11:17.883
If you need to parse the ResponseTime into other units of time, you can then use DATEADD or DATEPART.CODO ERGO SUM