use POSIX qw( strftime ); my ($y,$m,$d) = unpack( 'A4 A2 A2', '20100302165019' ); print( uc( strftime( "%d-%b-%y", 0,0,0, $d,$m-1,$y ) ), "\n" );