I m using below query from c# to compare current date with date stored in database as string.but it do not show the proper output even though it is not showing any error.
Select * from tblconcertdetail
WHERE STR_TO_DATE(Concert_Date,'%m/%d/%Y')>="+DateTime.Now.ToString("yyyy-MM-dd")+";
first argument shows as: 2011-06-10
second shows ; 2011-06-02
it shows all rows of table
Are you sure the first argument returns as you said YYYY-MM-DD???? Make sure the value for “Concert_Date” should look like “04/22/2011”.
Try the following:
I think Concert_Date is of datatype “date” or “datetime” or “timestamp”.