SQL Server - how to subtract 2 time column and display result in (hh:mm:ss)

Asked By soni a on 15-Oct-12 08:26 AM

i have 2 time columns
for ex:

time1 : 300:00:44

time2 : 288:08:40
i need to get the following
output : 11:52:04

Plz help

Thnkz in advance!!!!!!!!!!!

Venkat K replied to soni a on 15-Oct-12 01:45 PM
You can use the DATEDIFF function to find the date / time difference:

SELECT
DATEDIFF(Day, startDate, endDate)
 
FROM table