-----Original Message-----
Joe,
Judging by your sample, you just want to filter on the
date, not the date
time.
There are various ways of doing this, but I tend to strip
the decimal points
off the date by changing it to a Long and then back into
a date. In your
example, you could do it by entering the following SQL
into the (change
"Table1" to the name of your table):
PARAMETERS [@EnteredDate] DateTime;
SELECT Table1.*
FROM Table1
WHERE CDate(CLng([OnComplex]))=[@EnteredDate];
If you want to change this around to include a range of
dates (again
ignoring the time part):
PARAMETERS [@StartDate] DateTime, [@EndDate] DateTime;
SELECT Table1.*
FROM Table1
WHERE CDate(CLng([OnComplex])) BETWEEN [@StartDate] AND
[@EndDate];
Hope this helps,
Trev.
message
-----Original Message-----
Joe,
Could you post a sample of the data that you have and a
sample of the
results that you want. The better we can understand
your
question, the
better the answers will be
E.g
Table1
---------
TheDate TheName TheAddress
12/12/2003 12:50 Joe Bloggs 1 Joe Street
13/12/2003 13:50 John Smith 1 Smith Street
Query 1 (People on 12/12/2003)
-------------------------------
SELECT * from Table1 where cdate(clng([TheDate])) =
#12/12/2003#
TheDate TheName TheAddress
12/12/2003 12:50 Joe Bloggs 1 Joe Street
Trev.
message
My database originates with an imported comma
delimited
textfile. The field that I really need to "query" is
the
datatype General Date/Time like this "12/12/2003
12:50
PM". I have tried to use a query to split the date
away
from the time and it appears to work, but then a
query
using a date entered still does not return results.
The
DateValue() function only resulted in syntax error.
My "users" need to be able to enter a date and be
shown
every record of that date, regardless of time of day.
Anyone want to stab at this......thanks
.
Trev,
Here are some samples;
Textfile = F3207500,CMP,12/8/2003 8:32:00 AM,
F3207600,CMP,12/8/2003 6:36:00 AM,
F3207700,PUT,12/15/2003 6:58:00 AM,
Access Table = PO# Status OnComplex
(Datatype) (Text) (Text) (Date/Time)
F3207500 CMP 12/8/2003 8:32:00
AM
F3207600 CMP 12/8/2003 6:36:00
AM
F3207700 CMP 12/15/2003 6:58:00
AM
F3207800 OPN
F3207900 CMP 12/4/2003 7:08:00
AM
Desired result = User entered date "12/8/2003"
Should show all records for 12/8/2003.....
F3207500 CMP 12/8/2003 8:32:00
AM
F3207600 CMP 12/8/2003 6:36:00
AM
thanks again.
.
Trev,
Where would I plug in the SQL statements you suggested? I
know this is something I should already know, but duhhhh...
Thanks
Joe