Matt wrote:
> I think I've got the correct pattern for parsing a date below, but I get
> an error as shown below as well. Can someone tell me if I have an error
> in what I'm doing?

It works for me using DateTime 0.55 and DateTime::Format::Strptime 1.2000 with 
ActiveState ActivePerl 5.12.0.


    D:\>type mayday.pl
    #!perl

    use strict;
    use warnings;

    use DateTime::Format::Strptime;

    my $dt = DateTime::Format::Strptime->new(
        pattern   => '%d%b%y',
        time_zone => 'America/Chicago',
        locale    => 'en_US',
        on_error  => 'croak',
    )->parse_datetime('01MAY10');

    print $dt, "\n";

    D:\>perl mayday.pl
    2010-05-01T00:00:00

    D:\>



Jim Monty

Reply via email to