oracle11g - filter IN and OUT punch timings for Attendance in Day and Night shifts in oracle SP? -


i developing attendance system having day , night shift unable filter in , out punches of employees? below current logic.

shift timings on 29-jun-2015 in 22:00 out 07:00 , on 30-jun-2015 in 15:00 out 22:30

i filtering in , out punches based on shift timings , swipe time along date, when employee changing night shift day shift getting problem. below 1 scenario employee : 101 has worked on 29-jun-2015 on night shift punched @ 22:00 , left @ next day means 30-jun-2015 07:00 , again same day (30-jun-2015) came office @ 15:00 on 30-jun-2015 , left @ 22:30 on same day.

in case how can in , out tomes both dates?

sample data

enter image description here

employee no 60 , 61 shift time 8 5 pm. employee no 70 shift time 6 pm 3 am.

i don't think can done looking @ data per date. example employee 60 have time of:

6:00 9:00 12:00

this mean anything. maybe if can use more knowledge, example normal shift start , end times , shift duration.

if nobody ever misses clock punch can sort entries on date+time per employee. odd numbered entries in , entries out. better data in date column because sample have given looks string data me.


Comments