Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: localtime - make the date format different?

by ultranerds (Hermit)
on Dec 22, 2008 at 10:21 UTC ( [id://732026]=note: print w/replies, xml ) Need Help??


in reply to Re: localtime - make the date format different?
in thread localtime - make the date format different?

haha always the simple things :D
my @stats = stat("$folder/$file"); my @date = split / /, localtime $stats[9]; my $date = qq|$date[4] $date[1] $date[2] $date[3]|;


Thanks for the tip =)

Cheers

Andy

Replies are listed 'Best First'.
Re^3: localtime - make the date format different?
by jwkrahn (Abbot) on Dec 22, 2008 at 10:54 UTC

    That won't work correctly at the beginning of the month.

    $ perl -le' my @date = split / /, localtime 1228636800; print qq|$date[4] $date[1] $date[2] $date[3]|; ' 00:00:00 Dec 7

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://732026]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2024-04-24 09:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found