I store dates as String
in my database, in this format:
YYYY-MM-DD HH:MM:SS
which is one of supported formats (http://www.sqli
SELECT *
FROM MyTable
WHERE
column_date BETWEEN '2000-01-01 00:00:00' AND '2050-01-01 23:00:59'
Should do the trick. This only uses strings but you said that would be fitting.
The error was the missing time part or not doing a substr on the date part only. And then data/time conversion functions might give wrong things too.