Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
            return sprintf('%02d', $year) . "-$mon-$day\_$rest";
        }
    }
    
  2. or download this
    use strict;
    use warnings;
    ...
    my $date = sprintf('%02d-%02d-%02d_%02d:%02d:%02d',
                        $_[5] % 100, $_[4] + 1, $_[3], $_[2], $_[1], $_[0]
    +);
    print $date;