Results 1 to 2 of 2

Thread: DBase and dates

  1. #1
    Join Date
    Oct 2008

    Unanswered: DBase and dates

    I am trying to compare a date stored in an ODBC accessed date field with no luck. When I read the date field it returns a date formatted like 'yyyy-mm-dd' but when I try to programatically compare a date read with my own date I can't get a match, even if i copy that same date directly from what was read.

    sample code:
    $sql = "SELECT * FROM DB.DBF WHERE DATEFIELD = '2008-01-01' ";

    That query returns no results although I am certain that at least 1 record exists which matches the criteria.

    Using PHP am I missing something?

  2. #2
    Join Date
    May 2009
    Try "SELECT * FROM DB.DBF WHERE DATEFIELD = ctod('01/01/2008')"


Posting Permissions

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