Answers for "perl sprintf YYYYMMDD sample"

0

perl sprintf YYYYMMDD sample

my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
my $now = sprintf("%04d-%02d-%02d %02d:%02d:%02d", $year+1900, $mon+1, $mday, $hour, $min, $sec);
Posted by: Guest on August-13-2020

Browse Popular Code Answers by Language