B
Bob
I can not believe I'm even having to post a question like this. This
is stupid beyond imagination.
running access 2000, and I'm TRYING to create a query using date
criteria.
I have a table T_call_log that has a date/time field (long format). I
want to do a short-date comparison so I have a query:
SELECT Format([call_started],"mm/dd/yyyy") AS call_date
FROM T_call_log
ORDER BY T_call_log.call_started;
This query is saved as "Q_daily_calls"
Now I want to have another query that allows users to enter date
criteria, and show days on which calls were made. So I create that
query & I get data mismatch errors, so I simplify the query to figure
out the problem. Here's a PERFECTLY good query that SHOULD work: ;O)
SELECT DISTINCT Q_daily_calls.call_date, CDate([call_date]) AS
date_called
FROM Q_daily_calls
WHERE (((CDate([call_date]))>#6/18/2007#));
So - the first query creates a date string shortening the date, but
the 2nd query convert's it back into a date. I KNOW THAT #6/18/07# IS
a fricking date. And if I check the VB immediate window, I find that
indeed:
?typename(cdate("6/18/07"))
Date
Yes, cdate() DOES also return date data.
So - could someone kindly explain to me how there's a fricking data
mismatch in comparing a date to a date!?!?!?!?!
TIA - Bob
is stupid beyond imagination.
running access 2000, and I'm TRYING to create a query using date
criteria.
I have a table T_call_log that has a date/time field (long format). I
want to do a short-date comparison so I have a query:
SELECT Format([call_started],"mm/dd/yyyy") AS call_date
FROM T_call_log
ORDER BY T_call_log.call_started;
This query is saved as "Q_daily_calls"
Now I want to have another query that allows users to enter date
criteria, and show days on which calls were made. So I create that
query & I get data mismatch errors, so I simplify the query to figure
out the problem. Here's a PERFECTLY good query that SHOULD work: ;O)
SELECT DISTINCT Q_daily_calls.call_date, CDate([call_date]) AS
date_called
FROM Q_daily_calls
WHERE (((CDate([call_date]))>#6/18/2007#));
So - the first query creates a date string shortening the date, but
the 2nd query convert's it back into a date. I KNOW THAT #6/18/07# IS
a fricking date. And if I check the VB immediate window, I find that
indeed:
?typename(cdate("6/18/07"))
Date
Yes, cdate() DOES also return date data.
So - could someone kindly explain to me how there's a fricking data
mismatch in comparing a date to a date!?!?!?!?!
TIA - Bob