Kindly share suitable technique to handle night shift as well as day shift. Below are the shifts,
Night, 2020-07-20 17:00 to 2020-07-21 02:00
Night, 2020-07-20 17:00 to 2020-07-21 02:00
Day, 2020-07-20 08:00 to 2020-07-20 17:00
Day, 2020-07-20 08:30 to 2020-07-20 17:30
In Database there are only two fields
1: SSN (which is employee Code)
2: CheckTime e.x. (2020-07-20 16:48:30.000)
in Day shift i can get first in last out from Min entry and Max entry. but in night shift I can't get any accurate data because of the date change.
SELECT DATEADD(HOUR, 20, GETDATE()),GETDATE();
. If you have any problems using it, tell me and I can try to help you writing the query.