Hi,
Require urgent help for the following:
I have multiple in and out data for number of employees coming to office for a number of days. The employees come to office in three shifts as under:
First Shift: 6:00 AM to 3:00 PM
Second Shift: 2:00 PM to 11:00 PM
Third Shift: 9:00 PM to 6:00 AM.
I want to select the first in and last out data for each employee for each day and then calculate the total number of hours spent in the office by each employee per day.
A sample data is as under:
<tbody>
</tbody>[/TD]
[/TR]
</tbody>[/TABLE]
The data is required in the following format
[TABLE="width: 411"]
<tbody>[TR]
[TD][/TD]
[TD]Date[/TD]
[TD]Total Hours[/TD]
[TD]Akshay Aggarwal[/TD]
[TD]Taufique Ahmad[/TD]
[TD]l[/TD]
[/TR]
[TR]
[TD]In[/TD]
[TD]08-Nov-12[/TD]
[TD]hh:mm:ss[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Out[/TD]
[TD]08-Nov-12[/TD]
[TD][TABLE="width: 411"]
<tbody>[TR]
[TD]hh:mm:ss[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Total Hours[/TD]
[TD][/TD]
[TD][TABLE="width: 411"]
<tbody>[TR]
[TD]hh:mm:ss (Out - In)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]In[/TD]
[TD]09-Nov-12[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Out[/TD]
[TD]09-Nov-12[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Total Hours[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]In[/TD]
[TD]10-Nov-12[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Out[/TD]
[TD]10-Nov-12[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Total Hours[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Thanks in advance,
Vij
Require urgent help for the following:
I have multiple in and out data for number of employees coming to office for a number of days. The employees come to office in three shifts as under:
First Shift: 6:00 AM to 3:00 PM
Second Shift: 2:00 PM to 11:00 PM
Third Shift: 9:00 PM to 6:00 AM.
I want to select the first in and last out data for each employee for each day and then calculate the total number of hours spent in the office by each employee per day.
A sample data is as under:
[TABLE="width: 596"] <tbody>[TR] [TD]FIRST_NAME | EMPLOYEE | LDAP_ID | READER_DESC | LOCAL_DATE | LOCAL_TIME | |
Akshay Aggarwal | 41088 | aksaggar | 821-7-01 NOI:TURN 1 OUT FL7 | 20121108 | 02:04:59 | |
Akshay Aggarwal | 41088 | aksaggar | 821-8-00 NOI:TURN 2 IN FL7 | 20121108 | 02:20:28 | |
Akshay Aggarwal | 41088 | aksaggar | 821-7-01 NOI:TURN 1 OUT FL7 | 20121108 | 03:14:26 | |
Akshay Aggarwal | 41088 | aksaggar | 821-8-00 NOI:TURN 2 IN FL7 | 20121108 | 18:31:07 | |
Akshay Aggarwal | 41088 | aksaggar | 821-7-01 NOI:TURN 1 OUT FL7 | 20121108 | 21:47:35 | |
Akshay Aggarwal | 41088 | aksaggar | 821-8-00 NOI:TURN 2 IN FL7 | 20121108 | 22:19:24 | |
Taufique Ahmad | 37716 | taahmad | 821-8-00 NOI:TURN 2 IN FL7 | 20121108 | 14:26:49 | |
Taufique Ahmad | 37716 | taahmad | 821-7-01 NOI:TURN 1 OUT FL7 | 20121108 | 22:15:11 | |
Taufique Ahmad | 37716 | taahmad | 821-8-00 NOI:TURN 2 IN FL7 | 20121108 | 22:39:50 | |
Taufique Ahmad | 37716 | taahmad | 821-7-01 NOI:TURN 1 OUT FL7 | 20121108 | 23:25:27 | |
Akshay Aggarwal | 41088 | aksaggar | 821-8-01 NOI:TURN 2 OUT FL7 | 20121109 | 01:59:25 | |
Akshay Aggarwal | 41088 | aksaggar | 821-8-00 NOI:TURN 2 IN FL7 | 20121109 | 02:17:23 | |
Akshay Aggarwal | 41088 | aksaggar | 821-7-01 NOI:TURN 1 OUT FL7 | 20121109 | 03:19:10 | |
Akshay Aggarwal | 41088 | aksaggar | 821-7-00 NOI:TURN 1 IN FL7 | 20121109 | 18:09:38 | |
Taufique Ahmad | 37716 | taahmad | 821-8-00 NOI:TURN 2 IN FL7 | 20121109 | 14:17:49 | |
Taufique Ahmad | 37716 | taahmad | 821-7-01 NOI:TURN 1 OUT FL7 | 20121109 | 23:25:33 |
<tbody>
</tbody>
[/TR]
</tbody>[/TABLE]
The data is required in the following format
[TABLE="width: 411"]
<tbody>[TR]
[TD][/TD]
[TD]Date[/TD]
[TD]Total Hours[/TD]
[TD]Akshay Aggarwal[/TD]
[TD]Taufique Ahmad[/TD]
[TD]l[/TD]
[/TR]
[TR]
[TD]In[/TD]
[TD]08-Nov-12[/TD]
[TD]hh:mm:ss[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Out[/TD]
[TD]08-Nov-12[/TD]
[TD][TABLE="width: 411"]
<tbody>[TR]
[TD]hh:mm:ss[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Total Hours[/TD]
[TD][/TD]
[TD][TABLE="width: 411"]
<tbody>[TR]
[TD]hh:mm:ss (Out - In)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]In[/TD]
[TD]09-Nov-12[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Out[/TD]
[TD]09-Nov-12[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Total Hours[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]In[/TD]
[TD]10-Nov-12[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Out[/TD]
[TD]10-Nov-12[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Total Hours[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Thanks in advance,
Vij