Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003
    Posts
    1

    Unanswered: PHP, ACCESS Date/Time compare problem

    I am connecting to an Access database with PHP using and ODBC driver.

    I am trying to pull data out between 2 dates. The following query works fine in sql view in access.
    When I run it in PHP and echo out the count it says there is only 1 result and it displays the first record, but there should be over 150 records returned.

    If I leave out the time stuff it works fine in php and access.

    SELECT DateField
    FROM ChangeTab
    WHERE DateField
    BETWEEN #2003-10-16 10:14:22 PM# AND #2003-10-16 10:14:25 PM#;

    Any thoughts?

    Thanks

  2. #2
    Join Date
    Oct 2003
    Location
    France
    Posts
    10

    check out the date separator

    I think your trouble should come from the "-" used between the day, month and year of the date.
    Try with dot "." or slash "/"

    Bye

    vd6dv

Posting Permissions

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