Hi all!
I want to distribute (divide) total working hours of an employee to shifts. There are three shifts: first - from 6 AM to 2 PM, second -from 2 PM to 10 PM, and third from 10 PM to 6 AM
simple example:
- on may 7th, The employee worked from 7 AM to 7 PM, it has to be devided to 7 hours of first shift, and 5 hours of second shift.
not so simple example
- employee started work on may 7th, 7 PM and finished on may 8th at 7 AM. His working hours are: 3 hours of second shift on the may 7th, 2 hours of third shift on may 7th, 6 hours on third shift may8 th and 1 hour of first shift on may 8th.
Also, I will have to deal with the weekends and holidays, which are paid different.
How can I accomplish this? I have tried with median function, but as I understands it can not deal with everything.
Thanks a lot
Neven
I want to distribute (divide) total working hours of an employee to shifts. There are three shifts: first - from 6 AM to 2 PM, second -from 2 PM to 10 PM, and third from 10 PM to 6 AM
simple example:
- on may 7th, The employee worked from 7 AM to 7 PM, it has to be devided to 7 hours of first shift, and 5 hours of second shift.
not so simple example
- employee started work on may 7th, 7 PM and finished on may 8th at 7 AM. His working hours are: 3 hours of second shift on the may 7th, 2 hours of third shift on may 7th, 6 hours on third shift may8 th and 1 hour of first shift on may 8th.
Also, I will have to deal with the weekends and holidays, which are paid different.
How can I accomplish this? I have tried with median function, but as I understands it can not deal with everything.
Thanks a lot
Neven