SQL Server : I need to find difference between two times in the format of HH:MM
and both columns having time
datatype:
SELECT DATEDIFF(MINUTE, sh.ToTime, sh.FromTime)
FROM ShiftTimes sh
INNER JOIN StdBreaksInShifts sb ON sb.ShiftId = sh.ShiftId
Table:
Fromdate todate
----------------------------------------
08:15:00.0000000 16:30:00.0000000
Can anyone suggest how to do this?