Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

date manipulation

Status
Not open for further replies.

nix45

MIS
Nov 21, 2002
478
0
0
US
I'm looking for a module that does date manipulation. If I do....
Code:
$date = localtime;
...I could easily write a regexp to format the date in any way I need, but I'd rather not re-invent the wheel if I don't have to. I need the date in this format....YYYYMMDD. Will the Date::Manip module do this?

Thanks,
Chris
 
Date::Manip will do just about anything. It's not fast, though, so if you need speed you'd be better off using one of the other packages on CPAN. Date::Calc, for instance, is quite a bit faster for most applications.

If you don't need speed, however, I've found that Date::Manip is great to have around. It makes most date functions easy to use.
 
I got it, I decided to use Time::Format
Code:
use Time::Format qw(%time);
$date = $time{'yyyymmdd'};
print "date is $date\n";
Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top