Reputation: 1
I have a table in which the date is displayed in mmm-dd-yyyy format, I want to use a greater than in this date ( like date greater than october 2014) , can anyone suggest the sql query for this.
Upvotes: 0
Views: 405
Reputation: 20445
you can format the date first then sort
select * form table where DATE_FORMAT(date_colomn,'\%e/%c/%Y\')>your_date_here
or this one
select * form table where DATE_FORMAT(date_colomn,'%Y-%m-%d')>your_date_here
Upvotes: 1