in reply to calculate time(days)
Date::Calc is definately the way to go if you are doing date computations and you can try using "SYSDATE" on your RDBMS side. Instead of worrying about date or time stamps by your perl, always use SYSDATE instead, works much better.
$SQL = "INSERT INTO DB (name, date) VALUES (?, SYSDATE)"; $sth = $dbh->prepare($SQL); $sth->execute ( $name);
In Section Seekers of Perl Wisdom