I have 58 sequentially run jobs as part of our Database ETL. So, I took the start time of the 1st job and EndTime of 58th Job to calculate the totla Run time of the ETL.
I'm using the following TSQL logic to get the time difference between the jobs but if the ETL is > than 24 hours, I'm not getting the correct difference in hours. Please suggest.
Need to calculate the difference between 2012-12-16 20:57:01.293 and 2012-12-18 01:26:57.573
When I use: DATEDIFF(HH,Start.WorkQueueStartWorkDate,Finish.WorkQueueEndWorkDate) RunTimeInHours
I get 20 Hrs
When I use convert(varchar,(Finish.WorkQueueEndWorkDate - Start.WorkQueueStartWorkDate),108) RunTime
I get 04:29:56
Please help me getting the correct difference as Runtime.