Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!
  1. Monthly (Recurring) Target: $300 :: Achieved: $95
      Become a Supporter    ::   Make a Contribution   

Time Comparison

Discussion in 'Information Technology' started by Lamya, Jul 28, 2006.

  1. Lamya

    Lamya
    Expand Collapse
    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!!
     
  2. Loading...


  3. Allen Browne

    Allen Browne
    Expand Collapse
    Guest

    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.

    --
    Allen Browne - Microsoft MVP. Perth, Western Australia.
    Tips for Access users - http://allenbrowne.com/tips.html
    Reply to group, rather than allenbrowne at mvps dot org.

    "Lamya" <Lamya@discussions.microsoft.com> wrote in message
    news:EDA8067D-FCE5-48F9-9D92-E05F9072F037@microsoft.com...
    > 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!!
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page