I am making a payroll system and I bought the B3 tft from zktechnology and would like to arrange the record.
Currently I can pull the data from the biometric with this format:
Count EmpID InOutMode Date 1 1 0 8/20/2012 07:49:01 2 1 1 8/20/2012 12:08:21 3 1 0 8/20/2012 12:43:10 4 1 1 8/20/2012 17:56:15 5 2 0 8/20/2012 07:53:11 6 2 1 8/20/2012 12:02:01 7 2 0 8/20/2012 12:39:56 8 2 1 8/20/2012 17:20:43 9 1 0 8/21/2012 08:10:20 10 1 1 8/21/2012 12:01:26 11 1 0 8/21/2012 13:03:11 12 1 1 8/21/2012 17:11:15 13 2 0 8/21/2012 07:48:26 14 2 1 8/21/2012 12:14:58 15 2 0 8/21/2012 12:59:31 16 2 1 8/21/2012 17:20:12
InOutMode:
0 = In, 1 = Out
Now, I want to convert the data above like this:
EmpID Date AM_In AM_Out PM_In PM_Out 1 8/20/2012 07:49:01 12:08:21 12:43:10 17:56:15 2 8/20/2012 07:53:11 12:02:01 12:39:56 17:20:43 1 8/21/2012 08:10:20 12:01:26 13:03:11 17:11:15 2 8/21/2012 07:48:26 12:14:58 12:59:31 17:20:12
So I can save it to the database with EmpID, Date, AM_In, AM_Out, PM_In, PM_Out fields.
I saw a similar code here before but I can’t remember the URL.
Update:
VB.net code or sql in ms access format is acceptable.
It might be easiest to create two cross tabs and a query to join them to the available dates and employees.
1 AM Crosstab
2 PM Crosstab
Where tm is the name of your table.
You can then join these up.