If you just want to compare or sort date/times without going through this conversion hassle, I would advise using a format like: 2010-05-12 (YYYY-MM-DD). Leading zero'es are important! A string sort of dates like that will yield the correct order. So that is how to do compares and sorts of dates. For calculations using dates, see above.
In reply to Re: Comparing and increamenting dates in Perl
by Marshall
in thread Comparing and increamenting dates in Perl
by paragkalra
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |