Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PERL

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);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #perl #sprintf #YYYYMMDD #sample
ADD COMMENT
Topic
Name
9+8 =