in reply to DateTime Reformat

(Is it really '::'?)

my $datetime = '2009-09-22 20::45::30'; $datetime =~ s|(/d{4})-(/d{2})-(/d{2}) ([[:digit:]:]+)|$3/$2/$1[$4]|; print $datetime;

(Note: Code not tested.)

Replies are listed 'Best First'.
Re^2: DateTime Reformat
by skywalker (Beadle) on Apr 22, 2009 at 18:57 UTC
    Thats great, just what I was after, just need to add the open and close bracket around the time.

    thanks

      The brackets should be in there...