skywalker has asked for the wisdom of the Perl Monks concerning the following question:
Format in = '2009-09-22 20::45::30' Reformated out = 22/09/2009[20::45::30] Thanks Skywalkermy $datetime = '2009-09-22 20::45::30'; my ($date,$time) = $datetime =~/(.+\s)(.+)/; $date =~ s/^\s+|\s$//; my @print_date = split ("-",$date); @print_date = reverse @print_date; print join ("/",@print_date) ."[$time]";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DateTime Reformat
by ikegami (Patriarch) on Apr 22, 2009 at 18:45 UTC | |
|
Re: DateTime Reformat
by roboticus (Chancellor) on Apr 22, 2009 at 19:36 UTC | |
|
Re: DateTime Reformat
by mikeraz (Friar) on Apr 22, 2009 at 18:20 UTC | |
by ikegami (Patriarch) on Apr 22, 2009 at 18:36 UTC | |
|
Re: DateTime Reformat
by DStaal (Chaplain) on Apr 22, 2009 at 18:29 UTC | |
by skywalker (Beadle) on Apr 22, 2009 at 18:57 UTC | |
by DStaal (Chaplain) on Apr 22, 2009 at 19:13 UTC | |
|
Re: DateTime Reformat
by bichonfrise74 (Vicar) on Apr 22, 2009 at 21:34 UTC |