Link to home
Start Free TrialLog in
Avatar of thenemesiz
thenemesizFlag for Kenya

asked on

ADO SELECT WHERE Date Between

I am getting a 'Syntax error in date in query expression' for the following SELECT stmt:

strSQL = "SELECT * FROM Tiko WHERE T_Date BETWEEN #"
strSQL = strSQL & dtStart & "# and #"
strSQL = strSQL & dtEnd & "# ORDER BY T_Date"

dtStart = Date & " 00:00:00 AM"
dtEnd = Date & " 11:59:99 PM"

Please help!!
thanx


ASKER CERTIFIED SOLUTION
Avatar of gozoliet
gozoliet

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Dale Fye
Dale Fye
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of thenemesiz

ASKER

so, it was that **11:59:59 PM** all along...thanks gozoliet

...both solutions work!

thanks
If both solutions work, I have no objection to your reopening the question and splitting the points.
modus_in_rebus,

sorry about the points...am new here. How do I reopen the question?