I have a table with a column called date
, as a varchar. The contents are specifically formatted like \'March 11, 2011\'.
How can I select the results have
Yes, you can use the DATE function along with CURDATE.
SELECT * FROM tbl WHERE DATE(your_date_column) = CURDATE()
This will select all rows where your_date_column
is todays date.
If you want to select all rows where your_date_column
is between two dates, you can simply use BETWEEN:
SELET * FROM tbl WHERE your_date_column BETWEEN '20111-03-20' AND '2011-03-30'