I've got a bit of a problem calculating the duration of hours between
a clock-in time and a clock-out time. It's a fairly straight-forward
process. I put the clock-ins, clock-outs in a temp table and then do
an update on the table
UPDATE #TempEmpHours
SET Duration = DATEDIFF(mi, ClockIn, ClockOut)/60.0
The wacky results are below. Every other record has a negative value
for the duration. Has anybody ever seen something like this? Yes, I
am starting out with an empty temp table. I'm almost at my wit's
end. Any ideas?
Thanks,
Jennifer
ClockIn ClockOut Duration
8/23/08 3:00 PM 8/23/08 4:41 PM -18.2167
8/23/08 3:00 PM 8/23/08 6:02 PM 3.0333
8/23/08 3:00 PM 8/23/08 4:59 PM -17.9167
8/23/08 3:00 PM 8/23/08 7:20 PM 4.3333
8/23/08 3:00 PM 8/23/08 7:01 PM -15.8833
a clock-in time and a clock-out time. It's a fairly straight-forward
process. I put the clock-ins, clock-outs in a temp table and then do
an update on the table
UPDATE #TempEmpHours
SET Duration = DATEDIFF(mi, ClockIn, ClockOut)/60.0
The wacky results are below. Every other record has a negative value
for the duration. Has anybody ever seen something like this? Yes, I
am starting out with an empty temp table. I'm almost at my wit's
end. Any ideas?
Thanks,
Jennifer
ClockIn ClockOut Duration
8/23/08 3:00 PM 8/23/08 4:41 PM -18.2167
8/23/08 3:00 PM 8/23/08 6:02 PM 3.0333
8/23/08 3:00 PM 8/23/08 4:59 PM -17.9167
8/23/08 3:00 PM 8/23/08 7:20 PM 4.3333
8/23/08 3:00 PM 8/23/08 7:01 PM -15.8833
Comment