Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2003
    Location
    India
    Posts
    4

    Unanswered: compare two dates

    Hi,
    I am working on it from last two days...
    I want all the records between two dates...
    This query is running in the Oracle...but not in the MS Access2000...
    SELECT....
    FROM...
    WHERE date between '02-02-03' AND '03-03-03'

  2. #2
    Join Date
    Sep 2003
    Location
    Los Angeles
    Posts
    103

    Re: compare two dates

    Try
    "SELECT..FROM..WHERE date between #02-02-03# AND #03-03-03# "

  3. #3
    Join Date
    Aug 2003
    Location
    SW Ohio
    Posts
    198

    Re: compare two dates

    Originally posted by AccessUser
    Try
    "SELECT..FROM..WHERE date between #02-02-03# AND #03-03-03# "
    If that doesn't work try it as
    "SELECT..FROM..WHERE date between #02/02/2003# AND #03/03/2003# "
    Jim P.

    Supoorting Oracle, MSSQL7, Sybase 8, & Pervasive. Confusion Reigns

  4. #4
    Join Date
    Sep 2003
    Location
    India
    Posts
    4

    Talking Re: compare two dates

    Originally posted by AccessUser
    Try
    "SELECT..FROM..WHERE date between #02-02-03# AND #03-03-03# "
    Hi,
    Thank u very much For helping me....
    its working....
    i have another query....
    i am not getting time even though i set the respective field to Date/Time
    I am sending the Date object in VB....I am not getting time...
    Please help me how to save the time also....
    If u have sample code...please send me...
    Thank you

  5. #5
    Join Date
    Aug 2003
    Location
    SW Ohio
    Posts
    198

    Re: compare two dates

    Originally posted by skchakri
    Hi,
    Thank u very much For helping me....
    its working....
    i have another query....
    i am not getting time even though i set the respective field to Date/Time
    I am sending the Date object in VB....I am not getting time...
    Please help me how to save the time also....
    If u have sample code...please send me...
    Thank you
    Select Format(<fieldname>, "mm/dd/yyyy hh:nn:ss am/pm") as <DiffFieldName> From ......
    Jim P.

    Supoorting Oracle, MSSQL7, Sybase 8, & Pervasive. Confusion Reigns

Posting Permissions

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