If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Other > PHP, ACCESS Date/Time compare problem

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-21-03, 09:30
toona toona is offline
Registered User
 
Join Date: Oct 2003
Posts: 1
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
Reply With Quote
  #2 (permalink)  
Old 11-04-03, 04:23
vb6dv vb6dv is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On