Hello Everybody,
I have a table with 4 fields.
Employee Number, Date and Time, Statusid and Status Description. Sample data is given below.
873001 28/11/00 16:00:02 1 IN
873009 28/11/00 16:01:20 4 OUT FOR THE DAY
830000 28/11/00 16:01:32 2 OUT FOR BUSINESS
830000 28/11/00 16:01:37 4 OUT FOR THE DAY
873220 28/11/00 16:01:55 3 OUT FOR PERSONAL
873102 28/11/00 16:02:19 5 OUT FOR LUNCH
356461 28/11/00 16:06:22 1 IN
356461 28/11/00 16:13:46 4 OUT FOR THE DAY
356461 29/11/00 12:58:25 0
103002 29/11/00 13:06:50 2 OUT FOR BUSINESS
103002 29/11/00 13:08:34 1 IN
830000 29/11/00 13:10:04 4 OUT FOR THE DAY
103002 29/11/00 13:33:12 4 OUT FOR THE DAY
103002 29/11/00 13:36:11 1 IN
103002 29/11/00 13:37:53 5 OUT FOR LUNCH
103002 29/11/00 15:33:17 1 IN
103002 29/11/00 15:33:36 4 OUT FOR THE DAY
The table gets the values as output of a time keeping machine. I want to calculate the number of hours an employee worked per day/week/month basis.
Whenever an employee comes to the office in the morning he swipes his card and his status is IN. When an employee goes out either for lunch or business or personal he swipes his card and gets the appropriate status. when he comes back again he swipes and his status is IN.
There can be several IN for an employee the same day.
My problem is how to calculate the hours worked by an employee?
Ie (OUT FOR THE DAY) - (IN) (ie The first IN in the Morning). However the PERSONAL OUTS and LUNCH OUTS can't be calculated as part of the Working time. So i have to exclude it. Also i have to include BUSINESS OUT as part of the Working hours. How to do it?
Any logic or ideas or solutions will be highly appreciated.
Regards and Thanks
Charley
I have a table with 4 fields.
Employee Number, Date and Time, Statusid and Status Description. Sample data is given below.
873001 28/11/00 16:00:02 1 IN
873009 28/11/00 16:01:20 4 OUT FOR THE DAY
830000 28/11/00 16:01:32 2 OUT FOR BUSINESS
830000 28/11/00 16:01:37 4 OUT FOR THE DAY
873220 28/11/00 16:01:55 3 OUT FOR PERSONAL
873102 28/11/00 16:02:19 5 OUT FOR LUNCH
356461 28/11/00 16:06:22 1 IN
356461 28/11/00 16:13:46 4 OUT FOR THE DAY
356461 29/11/00 12:58:25 0
103002 29/11/00 13:06:50 2 OUT FOR BUSINESS
103002 29/11/00 13:08:34 1 IN
830000 29/11/00 13:10:04 4 OUT FOR THE DAY
103002 29/11/00 13:33:12 4 OUT FOR THE DAY
103002 29/11/00 13:36:11 1 IN
103002 29/11/00 13:37:53 5 OUT FOR LUNCH
103002 29/11/00 15:33:17 1 IN
103002 29/11/00 15:33:36 4 OUT FOR THE DAY
The table gets the values as output of a time keeping machine. I want to calculate the number of hours an employee worked per day/week/month basis.
Whenever an employee comes to the office in the morning he swipes his card and his status is IN. When an employee goes out either for lunch or business or personal he swipes his card and gets the appropriate status. when he comes back again he swipes and his status is IN.
There can be several IN for an employee the same day.
My problem is how to calculate the hours worked by an employee?
Ie (OUT FOR THE DAY) - (IN) (ie The first IN in the Morning). However the PERSONAL OUTS and LUNCH OUTS can't be calculated as part of the Working time. So i have to exclude it. Also i have to include BUSINESS OUT as part of the Working hours. How to do it?
Any logic or ideas or solutions will be highly appreciated.
Regards and Thanks
Charley