I have a simple DB in which the dates are stored in this format:
12-2-2008 12:00:00 AM
I need to create some reports to get the rate of some statistics, but the way I'm doing it isn't working.
I have some date ranges given by the user in format 12-2-2008.
This is my testing query... I'm probably doing something pretty stupid or just missing something small. Do I have to convert the user input to some other format?
Any suggestions?
SELECT COUNT(q.qid)
FROM
tr.qanswer AS q,
tr.monitors AS m
WHERE
q.answer = "YES"
AND m.evalid = q.evalid
AND m.agent_id = 966
AND m.Date >= '11-4-2008'
AND m.Date <= '12-4-2008'