I have a custom post type created when people checkin for their shift.
post_type_name = checkin
At the end of each month it would be great to know how much time was not covered by shifts. i.e. vacant,
So the idea would be that if a bunch of people didn't checkin or checked in late. I would get a total of hours eg: 12 hours that nobody was actually checked-in. I assume we can calculate late checkins when I compare 'post_date' to my meta 'start_unix' that will show if they checkin late. But I'm not sure how I would know if a person never checked in at all. Unless I compare last post to next post to see if it ended the same time another started.
This is the meta data I collect when they checkin and select their shift. My feeling was I would use the time the post was created vs
[start] => Array
 => Tuesday 06:00 PM
[start_unix] => Array
 => 1528840800
[end] => Array
 => Tuesday 10:00 PM
[end_unix] => Array
 => 1528855200
Arnav Joy answers:
how you are gathering check in time ?
and what about check out time ?
so if am correct check in time will be same for all day say 9 am in the morning and if any body check ins at 12 pm so we have 3 hrs vacant shift for the day and this will added to all other vacant shifts ??
please explain .
I don't get checkout time, I only have them enter shift when they arrive, They would select start and end time. Sometimes shift would overlap from one day to next, eg: 11pm to 6am type thing,
nothing to see just two time widgets that work together, they select start and end time click checkin.
Arnav Joy comments:
sorry not getting what do you mean by two time ?
start and end time checkin ???
on the front end all you see it two time selection widgets that let you select start and end time. The important part is I want to run a query that will tell me how much time in hours nobody checked into a shift.