Dates have a specific format requirement for being passed within the
WHERE clause:
{d'YYY-MM-DD'}
So, you need to format your fiel as appropriate so that it can be passed
in that fashion. It's a royal pain, but if you want to use dates in
your queries, you have to go through this process.
________________________________
From: qodbc@yahoogroups.com [mailto:qodbc@yahoogroups.com] On Behalf Of
sheaschultze
Sent: Monday, September 03, 2007 8:06 AM
To: qodbc@yahoogroups.com
Subject: [qodbc] Date Format in Where Statement of Pass Thru Query
Hi. I have the latest versions of the driver and QuickBooks
Enterprise 7. I use Access 2003. Pass Thru queries work just great
until I try to restrict by date.
This works perfect:
SELECT *
FROM InvoiceLine UNOPTIMIZED
WHERE ClassRefFullName = "001-Gfeller"
This fails:
SELECT *
FROM InvoiceLine UNOPTIMIZED
WHERE TxnDate = ????!!!!????
I've tried different bracketing:
(), {}, [], " ", ' ', ##
I've tried different date formats:
YYYY-MM-DD, YYYY-DD-MM, YYYYMMDD, MM/DD/YY, MM/DD/YYYY, etc.
Got a variety of different error messages like Unexpected Literal,
or etc.
Any suggestions?