antiskeptic
Programmer
Here's my situation...
I have "time" records in SQL that do not have an order or sequence number. So I have simply ordered them by the DetailDate and then by the StartTime.
They are records of employee time, that keep track of when the employee punched in / Punched out...when they took lunch, etc. Unfortuneately...unless the employee specifically punches out for LUNCH, it does not record a specific "break". So if I were to add the "TotalHours" for the same date below...I would come up with 8:00 hours even.
DetailDate PayPeriod TimeIn TimeOut TotalHours
2004-06-12 2004-06-25 7:59A 12:19P 04:20
2004-06-12 2004-06-25 1:23P 5:03P 03:40
Under certain laws a person working that long is entitled to a one hour break. If they do not take it on thier own, the company pays them for a 1 hour break an a manager manually enters that one hour. If, however, they took the break the company would not pay them for that extra time.
In the record above...you can see that the employee did indeed take an hour break. But how do I analyze the TimeOut punch to the NEXT TimeIn punch?
Any Ideas?
Sincerely,
Antiskeptic
I have "time" records in SQL that do not have an order or sequence number. So I have simply ordered them by the DetailDate and then by the StartTime.
They are records of employee time, that keep track of when the employee punched in / Punched out...when they took lunch, etc. Unfortuneately...unless the employee specifically punches out for LUNCH, it does not record a specific "break". So if I were to add the "TotalHours" for the same date below...I would come up with 8:00 hours even.
DetailDate PayPeriod TimeIn TimeOut TotalHours
2004-06-12 2004-06-25 7:59A 12:19P 04:20
2004-06-12 2004-06-25 1:23P 5:03P 03:40
Under certain laws a person working that long is entitled to a one hour break. If they do not take it on thier own, the company pays them for a 1 hour break an a manager manually enters that one hour. If, however, they took the break the company would not pay them for that extra time.
In the record above...you can see that the employee did indeed take an hour break. But how do I analyze the TimeOut punch to the NEXT TimeIn punch?
Any Ideas?
Sincerely,
Antiskeptic