I have a column which is a string, it holds values like that: 11.05.2012 05:22:12
Now I want to get all rows that have a date <= 30.09.2011 in that column. I tried
DATE_FORMAT(my_column_with_the_string_date, "%Y-%m-%d") <= '2011-09-30'
but this failed (returns no results). Any ideas?
What you need is the
STR_TO_DATE()function.Read more about it here.