Perl Sprintf Yyyymmdd Sample

[Solved] Perl Sprintf Yyyymmdd Sample | Perl - Code Explorer | yomemimo.com
Question : perl sprintf YYYYMMDD sample

Answered by : wicked-willet-vsb8fmui00e7

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);

Source : https://stackoverflow.com/questions/1814196/quickly-getting-to-yyyy-mm-dd-hhmmss-in-perl | Last Update : Thu, 20 Aug 20

Answers related to perl sprintf yyyymmdd sample

Code Explorer Popular Question For Perl