i am working on project where user have database with date stored in normal format 8 March 2013 and i want to sort the output with date .. but not getting right output bcos time stamp not used …. so is there way i can use or convert that date field to time stamp inside mysql query
SELECT * FROM imdb WHERE year ='2012' ORDER BY `date` DESC LIMIT 20
i want some thing like this
SELECT * FROM imdb WHERE year ='2012' ORDER BY strtotime(`date`) DESC LIMIT 20
but i know this wont work … is there a way out
since it is not a date, use
STR_TO_DATEto convert string to date