Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Perl's time and MySQL's timestamp

by iguanodon (Curate)
on Feb 05, 2003 at 10:32 UTC ( #232785=note: print w/ replies, xml ) Need Help??


in reply to Perl's time and MySQL's timestamp

If you use Date::Manip, you can set the Internal flag that tells it to return date-time strings without colons, which happens to be the same format that MySQL uses for timestamps:

use Date::Manip; Date_Init("Internal=1"); # No colons in dates, same as mysql my $end = ParseDate('today'); my $start = DateCalc('today', '- 5 days');


Comment on Re: Perl's time and MySQL's timestamp
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (19)
As of 2014-09-19 16:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (143 votes), past polls