How do I compare dates? Let’s say I have a table (tblEmp) with 2 fields – Name and HireDate. I need to display all employees hired before a certain date. Problem is I am using Dreamweaver to create my recordsets – so here’s what I have so far:
SELECT *
FROM tblEmp
WHERE HireDate <= 'varDate'
Then I define a variable 'varDate' and set it's default value to Date() and runtime value also to Date() just for testing (to see who was hired before today), but get an error saying there's a type mismatch. How do I get the results I want?