Time Comparison

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Its a Car Booking System.

Table 1 include (Employee Name, Car No., Date out, Time out, Date in, Time in)
Table 2 include (Car No, Fine Date, Fine Time)
Query: To find out whose driving the car during the fine date and time??

Our query works fine with date (Date in>Fine date>Date Out), however time
comparison doesn't work as the date comparison.
Please we need a HELP!!
 
In a fresh column of the Field row in query design, enter:
FineDateTime: CVDate([Table 2].[Fine Date] + [Table 2].[FineTime])

In the Criteria row below this, enter:
Between CVDate([Table 1].[Date out] + [Table 1].[Time out])
And CVDate([Table 1].[Date in] + [Table 1].[Time in])

It would be more efficient to combine those date and time pairs into one
field each. So Table1 would have fields:
OutDateTime contains the date and time booked out.
InDateTime contains the date and time booked back in.
and so on.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top