in reply to DBI date calculation with MySQL

As Zaxo mentions, your best bet for storing and comparing dates in MySQL is to use a DATE column, however for some problems using an big integer to store the time (seconds since epoch) can be more intuitive:

my $last28days = time - 60*60*24*28; $sql = "SELECT * FROM TTD WHERE SecSinceEpoch > $last28days";

It could also mean that I need to brush up on my SQL :-)
YMMV,
Joost.

-- Joost downtime n. The period during which a system is error-free and immune from user input.