Shift assignment and Attendance issue

I assign Night-Shift (20:00 to 08:00) to employee 1 Apr to 5 Apr and
from 6 Apr to 10 Apr assign Day-Shift (10:00 to 20:00)

the problem is when employee checkin on 5 apr in night shift then his shift complete on 6 Apr then he checkout on 6 Apr in
problem on 5th apr on in time it take nightshift and on 6th apr out time it take shift dayshift

so his attendance for that day will be absent that is problem
How it is solve