Compare two dates in Mysql stored in a varchar field - Mysql Views : 421
Tagged in : Mysql
0 0
Send mail
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



    Login to add Comments .