http://qs1969.pair.com?node_id=156783


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.

example:
$SQL = "INSERT INTO DB (name, date) VALUES (?, SYSDATE)"; $sth = $dbh->prepare($SQL); $sth->execute ( $name);