I am developing attendance system which will read data from device, and use that data to maintain employee attendance.
my data is like this.
FloorID GATEID ICARD DATE TIME STATUS
2 4 15580735 06-08-12 09:47:52 IN
2 3 15580735 06-08-12 10:05:54 OUT
1 1 15580735 06-08-12 10:05:34 IN
2 4 15580735 06-08-12 10:10:41 IN
1 2 15580735 06-08-12 10:11:50 OUT
1 1 15580735 06-08-12 10:12:52 IN
1 2 15580735 06-08-12 10:47:00 IN
1 2 15580735 06-08-12 10:47:01 OUT
2 3 15580735 06-08-12 10:50:00 IN
2 4 15580735 06-08-12 10:52:12 OUT
3 5 15580735 06-08-12 10:52:01 IN
3 6 15580735 06-08-12 10:52:01 OUT
3 6 15580735 06-08-12 10:52:02 OUT
Case for enter new entery and update existing entery
need to use only same floor data to update entry
seconds will be ignored from time part, need to use only HH:MI
IN Always New Entry
OUT 1) Check Related IN is there Update Out
2) If no IN Found Add New Entry for out
3) If same Out Entry more then one Update first IN Entry add remaining Out as New Entry
like this
Desiered output[
^]