Apr 16 2019 12:09 PM
Hi guys,
We are using fingerprint device to record staff attending and leaving time. when we extract the monthly report from the device, we need to manipulate this report to serve our needs. The extracted reports contain four columns (Emp_ID,Emp_name, Date, time),
The device saves a record every time the employee put his/her fingerprint(either for time in or time out), so for every working day the employee must have two records ( we have a problem, some staff have just one record (see 3) we do not know if it is for time in or out, some have double records for time in(see 12,13), some seems like the staff record the time out then he stayed more time then he record another time out (see 17,18,19)
* staff come and leave in different times
I need to calculate the working hours per day for every employee with taking the consideration the points mentioned above.
Emp_ID | Emp_Name | Date | Time | working hours/Day | |
1 | 1 | Abdullah | 02/02/2019 | 12:00 | |
2 | 1 | Abdullah | 02/02/2019 | 18:06 | |
3 | 2 | Khaled | 02/02/2019 | 11:09 | |
4 | 3 | Ahmed | 02/02/2019 | 09:58 | |
5 | 3 | Ahmed | 02/02/2019 | 14:52 | |
6 | 4 | Akram | 02/02/2019 | 12:29 | |
7 | 4 | Akram | 02/02/2019 | 18:44 | |
8 | 5 | Saeed | 02/02/2019 | 08:07 | |
9 | 5 | Saeed | 02/02/2019 | 13:33 | |
10 | 6 | Mona | 02/02/2019 | 10:55 | |
11 | 6 | Mona | 02/02/2019 | 18:36 | |
12 | 7 | Hashem | 02/02/2019 | 11:08 | |
13 | 7 | Hashem | 02/02/2019 | 11:08 | |
14 | 7 | Hashem | 02/02/2019 | 19:06 | |
15 | 8 | Rana | 02/02/2019 | 09:41 | |
16 | 8 | Rana | 02/02/2019 | 13:17 | |
17 | 10 | Ebrahim | 02/02/2019 | 09:27 | |
18 | 10 | Ebrahim | 02/02/2019 | 14:24 | |
19 | 10 | Ebrahim | 02/02/2019 | 14:36 | |
20 | 1 | Abdullah | 03/02/2019 | 11:44 | |
21 | 1 | Abdullah | 03/02/2019 | 18:35 | |
22 | 3 | Ahmed | 03/02/2019 | 09:53 | |
23 | 3 | Ahmed | 03/02/2019 | 14:56 | |
24 | 4 | Akram | 03/02/2019 | 12:18 | |
25 | 4 | Akram | 03/02/2019 | 18:43 | |
26 | 5 | Saeed | 03/02/2019 | 08:00 | |
27 | 5 | Saeed | 03/02/2019 | 13:11 | |
28 | 6 | Mona | 03/02/2019 | 13:32 | |
29 | 6 | Mona | 03/02/2019 | 18:35 | |
30 | 7 | Hashem | 03/02/2019 | 14:54 | |
31 | 8 | Rana | 03/02/2019 | 08:15 | |
32 | 8 | Rana | 03/02/2019 | 13:27 | |
33 | 10 | Ebrahim | 03/02/2019 | 08:26 | |
34 | 10 | Ebrahim | 03/02/2019 | 14:29 |