Search between 2 dates

icemac

Registered User.
Local time
Today, 14:39
Joined
Jul 17, 2006
Messages
31
I have created a database for a hyperthetical car hire company. I have a booking table, a customer table and a car table. If a customer books a car starting on one date and ending on another I want the database to generate a list of cars that are not being used at these times. I have worked out that:

old finish date (of all other cars) < new start date (of new booking)

How do I impliment this? I have limited knowladge of MS Access.

Iain
 
wHERE MyDate between AddDate(d,1,OldFinishDate) AND AddDate(d,-1,NewBookingDate)

Basically

If you are NOT tracking the time, the -1 day from NewBookingDate may or maynot be needed.
Play with it until you get what you are looking for
 

Users who are viewing this thread

Back
Top Bottom