Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: calculate time(days)

by data67 (Monk)
on Apr 04, 2002 at 21:58 UTC ( #156783=note: print w/replies, xml ) Need Help??


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);

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://156783]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2022-12-04 13:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?