Link to home
Start Free TrialLog in
Avatar of lunchboxbill
lunchboxbill

asked on

ASP, MS Access SQL string help!!

Hi,

sorry its only worth 70 points - its all i have! will bump iut up as much as i can when i accept the answer!

Can anybody tell me why this doesnt work?

sql = "SELECT * FROM table WHERE (myDate BETWEEN #"&date_1&"# AND #"&date_2&"#);"

the ouput sql is

SELECT * FROM productionSheet WHERE myDate BETWEEN #27/03/2006# AND #01/07/2006#;



the asp page doesnt crash out, but doesnt retrieve any of the data i am expecting it too.

the myDate field in the access db is a date/time datatype and is of a general format.

many thanks!
Avatar of Lee W, MVP
Lee W, MVP
Flag of United States of America image

Just guessing - perhaps access is storing the dates in MM/DD/YYYY format?
Avatar of lunchboxbill
lunchboxbill

ASKER

how do i switch it around? do i have to do it in the asp or access side?

thanks
ASKER CERTIFIED SOLUTION
Avatar of TimCottee
TimCottee
Flag of United Kingdom of Great Britain and Northern Ireland 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
lunchboxbill,

So yes you would have to do this on the asp side.

Tim