retrieve next 24 hours details from the table
i read one thread, same question here
but small diff is , my field name is jdate is the varachar, but they are used the datetime data type format,
retrieve next 24 hours details from the table
i read one thread, same question here
but small diff is , my field name is jdate is the varachar, but they are used the datetime data type format,
use str_to_date before :)
http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_str-to-date
so the sql like :
WHERE STR_TO_DATE(my_field,'myformat') > DATE_SUB( NOW(), INTERVAL 24 HOUR)