On 07/25/2013 10:14 AM, mimic...@gmail.com wrote:
I was trying to use Date::Simple to convert date from DD-MM-YYYY to ISO standard YYYY-MM-DD, but it produced error below because it returned undef when the date passed is not ISO standard.

Yeah on quick scan of the perldoc it looks like Date::Simple doesn't offer much in the way of parsing.

[...]

Most of the date modules on CPAN cannot do the job for me. I spent time reading documentations but as it now stands, I have to do this myself.


There are at least 2 modules that can definitely do the job for you, Date::Manip::Date and DateTime (with DateTime::Format::Natural). I usually use the latter, but since you want the former:

Have a look at the documentation for Date::Manip::Date and look for parse_format and printf

If you are still stuck, don't hesitate to show your attempt and ask for more help.

Cheers,
Michael

--
Michael Brader                    Senior Software Engineer and Perl Person
Our World Wide Web has a World Wide Network      Technology/Softdev/DevOps
Internode       http://internode.on.net/          mbra...@internode.com.au
iiNet             http://iinet.net.au/         m.bra...@staff.iinet.net.au

Reply via email to