Help for this page

Select Code to Download


  1. or download this
    my $date = '2008032017';
    my ($year, $month, $day, $hour) =
        $date =~ m{(\d{4})(\d\d)(\d\d)(\d\d)};
    print "$year-$month-$day $hour\n";
    #Output: 2008-03-20 17