in reply to Re^3: AM/PM to 24 hours
in thread AM to 24 hours
Output:use Date::Manip; use Text::CSV; my $csv = Text::CSV->new; while (<>) { $csv->parse($_); my @f = $csv->fields; $f[7] = UnixDate $f[7], "%Y-%m-%d-%H.%M.%S.0000"; $csv->combine(@f); print $csv->string . "\n"; }
ID,21,11814,1,11989,150,Y,2012-10-25-23.36.25.0000,TEST ID,22,11814,1,11989,150,Y,2012-10-25-23.36.25.0000,TEST
* Should note that the example above isn't kosher as per the documentation. It will fail on embedded newlines and isn't Unicode friendly. Best to consult that documentation if this is anything other than a one-off.
|
|---|