title: filter IN and OUT punch timings for Attendance in Day and Night shifts in oracle SP?
body: <p>I am developing Attendance system which having day and night shift I am unable to filter the IN and OUT punches of the employees? below is my current logic. </p>
  
  <p>shift timings on 29-Jun-2015 IN 22:00 OUT 07:00 and on 30-Jun-2015 IN 15:00 OUT 22:30</p>
  
  <p>I am filtering the IN and OUT punches based on shift timings and swipe time along with date, but when the employee changing from night shift to day shift I am getting problem.
  the below is the one scenario
  the employee : 101 has worked on 29-Jun-2015 on night shift punched at 22:00 and he left at next day means 30-Jun-2015 07:00 AM and again the same day (30-Jun-2015) he came to office at 15:00 on 30-Jun-2015 and he left at 22:30 on the same day. </p>
  
  <p>In this case how can I get IN and OUT tomes for both dates?</p>
  
  <p>Sample Data</p>
  
  <p><img src="https://i.stack.imgur.com/gC2tR.png" alt="enter image description here"></p>
  
  <p>Employee No 60 and 61 shift time 8 AM to 5 PM.
  Employee No 70 shift time 6 PM to 3 AM.</p>