Я сделал это в Perl, трудный путь
sub formatDate_YYYYMMDD
{
my $date=shift;
my ($day,$mon,$yr) = split /\-/,$date;
my @months=qw(JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC );
$i=0;
foreach $_ (@months)
{
$i++;
if (/$mon/i){$mon=$i;}
}
$year=2000+$yr;
$mon=sprintf "%02d",$mon;
print "Invalid month format $date present in $file_name" if $mon ==0;
return("$year$mon$day");
}