Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
output:-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";
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.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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to convert mtime using strftime() in perl
by Zaxo (Archbishop) on Jun 28, 2006 at 18:44 UTC | |
|
Re: How to convert mtime using strftime() in perl
by Fletch (Bishop) on Jun 28, 2006 at 18:46 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |