Help for this page

Select Code to Download


  1. or download this
    use strict; use warnings;
    use feature qw/ say state /;
    ...
    2017-01-32 11:30:07.370
    2017-01-29 11:30:07
    foo bar
    
  2. or download this
    my $str = '2017-01-29 11:30:07.370';
    $parser = DateTime::Format::Strptime->new( pattern => '%F %T.%3N' );
    ...
    } else {
        say "$str is not a valid date";
    }