I'm not positive if your actual statement looks like your model you gave to
us, but the main thing I see wrong with your model is how you are using
BETWEEN. If you have the Northwind Traders example database, here is an
example query to do basically the same thing:

SELECT * FROM Orders
        WHERE RequiredDate BETWEEN '01/01/1996' AND '08/15/1996'


See if that syntax works better for you. If it's something more than that,
reply back, and I'm sure we can get that working.


Steve Howard.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 18, 2001 2:23 PM
To: [EMAIL PROTECTED]
Subject: MS ACCESS Date Fields


Hello,
i'm using Perl/DBI/CGI to connect to an MS ACCESS
database on the same
server. I can use SELECT and fetch data and pass it to
the browser, works fine. But
now I need to use some kind of BETWEEN sql statement that
will let me filter
records for a specific period of time. Something like:
"SELECT * from table
WHERE x=y AND date x BETWEEN y". I don't know how to use
the filter with
the ACCESS dates records. I am also using the Format
Format(tbl1.date,
'mm-dd-yy') command to get ride off the extra 00:00:00
that I would get if I don't
use format.
Please any ideas?

Thanks,
Miguel

Reply via email to