R
Rich Bogle
I need to format the output from localtime below to have a 2 digit year, 2
digit month, and 2 digit day. If my memory serves right I believe there are
formatting options for localtime but cannot find reference to them. If they
don't exist I could format this the long way. I need the above format to
compare to folders that are named by the above date format.
sub currentdate {
#Get Current Date / Time
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime;
$year = $year + 1900;
$mon = $mon + 1;
$curdate = $year . $mon . $mday;
print $curdate . "\n";
}
Thanks,
Rich
digit month, and 2 digit day. If my memory serves right I believe there are
formatting options for localtime but cannot find reference to them. If they
don't exist I could format this the long way. I need the above format to
compare to folders that are named by the above date format.
sub currentdate {
#Get Current Date / Time
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime;
$year = $year + 1900;
$mon = $mon + 1;
$curdate = $year . $mon . $mday;
print $curdate . "\n";
}
Thanks,
Rich