|
|
Compare two dates in Mysql stored in a varchar field - Mysql
|
Views : 421
|
|
Tagged in : Mysql
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
Compare two dates in Mysql stored in a varchar field
If you have stored date in a varchar field instead of date field and want to compare two dated and fetch result, normal date comparison like date>='2010-11-09' won't work. You have to use STR_TO_DATE() function.
STR_TO_DATE(date, '%d-%m-%Y')>='2010-11-09' |
|
By Rekha, On - 2010-11-09 |
|
|
|