uksza has asked for the wisdom of the Perl Monks concerning the following question:
ormy $date = `date +%Y-%m-%d_%H:%M`; chomp $data;
ormy ( $ss, $mm, $hh, $mday, $mon, $year, $wday, $yday, $isdst ) = localtime(); my $data = sprintf( "%d-%02d-%02d %02d:%02d", ( $year += 1900, $mon += 1, $mday, $hh, $mm ) );
First is little and nice, but use external program.use POSIX 'strftime'; my $date = strftime '%x %X.', localtime;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to get quick i nice date format?
by demerphq (Chancellor) on Feb 08, 2006 at 10:47 UTC | |
|
Re: How to get quick i nice date format?
by holli (Abbot) on Feb 08, 2006 at 12:08 UTC | |
|
Re: How to get quick i nice date format?
by davis (Vicar) on Feb 08, 2006 at 10:36 UTC | |
|
Re: How to get quick i nice date format?
by mickeyn (Priest) on Feb 08, 2006 at 15:30 UTC |