I have to calculate the idle Hrs of a working employee.
Three shifts are there.
Morning 7AM to 3PM
Evening 3PM to 11PM
Night 11 PM to 7AM.
Also if overtime then shift pattern is
Morning 7AM to 7PM
Evening 11AM to 11PM
Night 7PM to 7AM.
So the in time for an employee will be based on the above time range.
Example:
We have idle Hrs for the following time set.
10:20:00 AM to 10:40:00 AM = 00:20:00
10:40:00 AM to 11:25:00 AM = 00:45:00
02:40:00 PM to 03:00:00 PM = 00:20:00
03:00:00 PM to 03:30:00 PM = 00:30:00
03:45:00 PM to 05:15:00PM = 01:25:00
One of the employee came at 07:13:46AM and leaving office at 07:19:26PM. So based on the above idle Hrs she has 03:20:00 hrs idle.
So the idle time may change for each day. Based on the in time i need the total idle Hrs.
[TABLE="width: 234"]
<colgroup><col span="2"><col></colgroup><tbody>[TR]
[TD]
Please help me in this...[/TD]
[/TR]
</tbody>[/TABLE]
Three shifts are there.
Morning 7AM to 3PM
Evening 3PM to 11PM
Night 11 PM to 7AM.
Also if overtime then shift pattern is
Morning 7AM to 7PM
Evening 11AM to 11PM
Night 7PM to 7AM.
So the in time for an employee will be based on the above time range.
Example:
We have idle Hrs for the following time set.
10:20:00 AM to 10:40:00 AM = 00:20:00
10:40:00 AM to 11:25:00 AM = 00:45:00
02:40:00 PM to 03:00:00 PM = 00:20:00
03:00:00 PM to 03:30:00 PM = 00:30:00
03:45:00 PM to 05:15:00PM = 01:25:00
One of the employee came at 07:13:46AM and leaving office at 07:19:26PM. So based on the above idle Hrs she has 03:20:00 hrs idle.
So the idle time may change for each day. Based on the in time i need the total idle Hrs.
[TABLE="width: 234"]
<colgroup><col span="2"><col></colgroup><tbody>[TR]
[TD]
Please help me in this...[/TD]
[/TR]
</tbody>[/TABLE]