I have a table with one timestamp field named "timedate" (Unix_timestamp format). I used the follow command but it's not working correctly:

mysql> select count(*) from tablename where date_format(timedate,"%Y-%m-%d") between date_sub(now(), interval 1 DAY) and now();
Empty Set


This result is not right since I know there are records in the table that got inserted in the past 24 hours. Does anyone know why?

Also it seems unix_timestamp() function only return results in GMT timezone. I don't know how it can return results in US central timezone.

Thanks,
Hai

_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail



-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to