Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- SQL Statement with DATE format
- Andre Stumpf
June 25, 2007, 10:39 am
rate this thread
Re: SQL Statement with DATE format
This problem is more than likely due to your dates not being inside
quotes in the SQL query. When substitution takes place, your SQL
string should end up similar to this:
SELECT * FROM myDB.myTABLE WHERE dat_start = '2007-06-25'
Whereas without quotes the query would fail because of the unquoted
SELECT * FROM myDB.myTABLE WHERE dat_start = 2007-06-25
If the dates are coming from user input, be careful not to allow a SQL