#!/usr/bin/perl use strict; use warnings; use DateTime::Format::Strptime; my $strp = DateTime::Format::Strptime->new(pattern => '%b %d %Y %I:%M%p'); my $string = 'Dec 11 2003 12:00AM'; my $dt = $strp->parse_datetime($string) or die; $string = $dt->strftime('%m/%d/%Y'); # warning! illogical format!! print "$string\n";