Tuesday, October 22, 2013

Format time stamp in decimal number only

# Script
use POSIX qw(strftime);
my $now_string = POSIX::strftime("%Y%m%d_%H%M%S", localtime);
print "$now_string\n";
# Output
D:\Radisys_work\scripts>perl test_date.pl
20110708_101903

Good reference: 
http://www.tutorialspoint.com/perl/perl_date_time.htm

No comments: