Date comparison function

M

Ming Wei

Is there a Date module which I can use to compare Date Strings ?

e, g. if I have the following two date strings in different format:

Feb 9 15:00

2004/02/18 21:29:05

How do I convert them into a common format and then compare them to
see which date is more current ?

Thanks
 
S

Sunder Chakravaty

Is there a Date module which I can use to compare Date Strings ?

e, g. if I have the following two date strings in different format:

Feb 9 15:00

2004/02/18 21:29:05

How do I convert them into a common format and then compare them to
see which date is more current ?

Thanks
"perldoc -q date" should help. Here is a snip
if you don't know the precise format of your
dates, then you should probably use either of the
Date::Manip and Date::Calc modules from CPAN
before you go hacking up your own parsing routine
to handle arbitrary date formats.
 
G

Gunnar Hjalmarsson

Sunder said:
"perldoc -q date" should help. Here is a snip
if you don't know the precise format of your
dates, then you should probably use either of the
Date::Manip and Date::Calc modules from CPAN
before you go hacking up your own parsing routine
to handle arbitrary date formats.

I wonder why it doesn't mention Date::parse, which module appears to
be more on the spot.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top