Hi Monks,
I am having a code to convert mtime to yyyymmdd hhmm using strftime function.But i am getting error as follows,see the code
use POSIX qw(strftime);
$mtime = 1151492749;
$systime = localtime($mtime);
print"Systime=> $systime\n";
$now_string = strftime "%a %b %e %H:%M:%S %Y", $systime;
print"New stirng=> $now_string\n";
output:-
Systime=> Wed Jun 28 16:35:49 2006
Usage: POSIX::strftime(fmt, sec, min, hour, mday, mon, year, wday = -1
+, yday = -1, isdst = -1) at one.pl line 46.
When I run this code i am getting this issue,Now I want the output as New stirng=> 20060628 1635.How I can get this.Please help me.
Thanks.