Hi guys!
I have a query whereby the bookings that are retrieved (in a particular instance) are those that were added 2 days ago:
(TIMESTAMPDIFF(HOUR, bookings.creation_date, NOW()) > 48)
However, the problem is that if a delegate adds a booking at 5:01pm, one minute after the client knocks off for the day, the booking would lay unattended until the following day, which is effectively the third day.
What they’re wanting is not a measure by hours, but one by whole days. So, if the delegate adds a booking at 23:59, the booking is still within the one (first) day, rather than measuring its age based on hours.
Sadly, I can’t think of how I’d express that in a query. Any ideas? Assuming I’ve been able to articulate what I mean properly.