How your date field is stored is how you must reference it in SQL. For instance, a lot of our dates are stored as an integer like this:
Therefore, my SQL is this:
WHERE date < 20100601
But there are a lot of other date formats that you could be using. Whatever date format the database is using is the date format you need to use when comparing a literal to the database field. That is what the SQL error is telling you.