my $strp = DateTime::Format::Strptime->new(pattern => $pattern); ... my $dt = $strp->parse_datetime($value) || ;