Forums

This topic is locked

DATE comparisons

Posted 29 Oct 2004 23:27:36
1
has voted
29 Oct 2004 23:27:36 John Ceballos posted:
Hello all!

I was wondering if somebody has run iunto this problem. I am creating a page that is saved as an ASP page where it queries an Access database. The query is that I need is to look up in a table a date where it falls between two dates that are received from a form. The query I have so far is this:
SELECT Keyword, Spam_Policy, Production_Date, Production_Spam_Policy
FROM [DatingSinglesAdult]
WHERE Production_Date between #"& 'varfromdate' & "# and #"& 'vartodate' &"#
ORDER BY Production_Date

I've use convert to try to convert it to text. Can't use to_date since I am not using ORACLE. varfromdate and vartodate are the variables that get their values from a form. Anybody has any idea what I am doing wrong and how to fix this? Thanks.

Reply to this topic