Friday, February 1, 2013

MySQL comparing timestamp with date


To find records older than 30 days using timestamp field:

Select from TableName where from_unixtime(tstamp) < (NOW() - INTERVAL 30 day);