0
Dear try this
Select UserCode,
Cast((DateDiff(mi,Starttime,EndTime) / 60) As Varchar(8)) + ':' +
Cast((DateDiff(mi,Starttime,EndTime) % 60) As Varchar(2)),Starttime As [In Time],EndTime As [Out Time ]From tblLogIn
Accepted 0
Hi,
Note that when you use the HH will give the date difference in hours. But it needs something like entire different between two dates.
I think get the seconds or minutes and find the differences, so you can calculate the actual time different by diving the minutes.
0
Hi
use datediff like
select
sum(Datediff(hour,StartingDate,EndingDate)) from ItemDiscount