Hello all,
I feel like the answer lies here somewhere, but I'm having difficulty combining the possible answers into one, elegant solution.
I'm trying to find the number of instances that a customer comes in to when they leave. I am trying to find out how many customers are present during specific time frames (here, 11pm to 8am).
So if customer A comes in at 11 pm and leaves the next day at 3 am, and I have my headers as such, I'd like it to return the following values. Likewise, if they come in before the range of 11p-8a, but are present within the range, to still return a "1" for the fact that they are present. Any combination of logic I use gets confounded when I cross midnight. I do have the dates they came in in a column, but not the dates they left, which means I'd have to manually look for instances where it crossed midnight to fill in that is was the next day.
Thank you for any help!
I feel like the answer lies here somewhere, but I'm having difficulty combining the possible answers into one, elegant solution.
I'm trying to find the number of instances that a customer comes in to when they leave. I am trying to find out how many customers are present during specific time frames (here, 11pm to 8am).
So if customer A comes in at 11 pm and leaves the next day at 3 am, and I have my headers as such, I'd like it to return the following values. Likewise, if they come in before the range of 11p-8a, but are present within the range, to still return a "1" for the fact that they are present. Any combination of logic I use gets confounded when I cross midnight. I do have the dates they came in in a column, but not the dates they left, which means I'd have to manually look for instances where it crossed midnight to fill in that is was the next day.
Thank you for any help!
Time in | Time out | 11:00pm-11:59pm | 12:00am - 12:59 am | 1:00 am - 1:59 am | 2:00 am - 2:59 am | 3:00 am - 3:59 am | 4:00 am to 4:59 am | |
Customer A | 11:32 pm | 3:30 am | 1 | 1 | 1 | 1 | 1 | 0 |
Customer B | 9:30 pm | 2:30 am | 1 | 1 | 1 | 1 | 0 | 0 |
Customer C | 10:45 pm | 12:09 am | 1 | 1 | 0 | 0 | 0 | 0 |