Unix Timestamps and MySQL

Unix timestamps (the number of seconds since Jan 1st 1970) can be converted online at:
Some example dates:
26 Feb 2006 19:37 1141000668
26 Feb 2007 19:37 1172536620
26 Feb 2008 19:37 1204072620
12 Aug 2007 12:00 1186934400
I had cause to prune some old records from MySQL by unix timestamp, which I did with:
USE `emaillog`;
DELETE FROM `deliveries` WHERE timestamp<1186934400;
19 million records can take some time to complete (>4 hours). It might be better to prune this stuff a little more regularly 😉

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>