Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Sep 2002
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Between Dates (2000 SR1)

    What is the correct format to enter a between dates in a select query?

  2. #2
    4 Star Lounger SteveH's Avatar
    Join Date
    Jan 2001
    Location
    Chelsea, Gtr London, United Kingdom
    Posts
    587
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Between Dates (2000 SR1)

    .....Between #01/01/2002# And #01/06/2002#......

    Jet uses US Date format (mm/dd/yy) natively. This can conflict if you use UK settings (dd/mm/yy). My example would find 6 days in US and 6 months in UK! I'm not all that clear on the interaction between regional settings and Jet's native format.
    Steve H
    IT Lecturer/Access Developer
    O2K SR3/O2010; Win7Pro

  3. #3
    New Lounger
    Join Date
    Aug 2002
    Location
    California, USA
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Between Dates (2000 SR1)

    At least in my experience with the U.S. version of the software, it doesn't make any difference. 8/7/02, 8-7-02, and "August 7 2002" all work.

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Between Dates (2000 SR1)

    SQL insists on US formatted dates, regardless of the date format you use in storing the values. However, you can use the format function to convert both the actual date and the criteria to strings for comparison or you can use the CDate function to convert the strings to equivalent dates.
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •