This content has been marked as final. Show 2 replies
You'll need to surround the value with apostrophes.1 person found this helpful
But an even better way would be to learn to use PreparedStatements, which is the correct way and avoids that sort of problems (among others).
Kayaman wrote:Even that will probably not work as the query will now get the toString representation of the date object.
You'll need to surround the value with apostrophes.
I'm not even going to mention how to correct that, PreparedStatement is indeed the only true answer here.