I could swear we've answered this before from another user... anyway.
Your demonstration doesnt show what you think it shows.
Night Shift Employee 'A' comes in the office at 17:00PM (Consider: Date 9th Aug, 2012) and leaves on 9:00AM (Date: 10th Aug, 2012)
That would be a shift of 16 hours (17-24+0-9).
You then show the data as:
Date 9Aug 10thAug
In Time 18:00 9:00AM
Out Time 23:58(if left for a break)
Total Hours 5:58
Where did Out Time come from? Why does your total hours think he was only there for a hair under 6 hours? (18:00-23:58) Did he leave then and not come back? Where did the 9:00 come from (or go?)