about timestamp reformat

From: janet (esthershensh_at_yahoo.com)
Date: 03/22/04


Date: 22 Mar 2004 10:36:52 -0800

HI,

I'm new in perl..

I'm not sure if that is easy to use Perl to change the timestamp
format in the text file..

I got the txt file from sybase database, because the format is
different , I need to change it suitable to out DB2 database..

I heard that Perl is good at text processing... But I'm not very
familiar with it...

For example I want to change the format from following

a|b|c|Jul 14 2000 4:56:00:000PM|d|e|f|Jul 14 2000
4:56:00:000PM|h|I|j

to

a|b|c|2000-07-14-16:56:00:000000|d|e|f|2000-07-14-16:56:00:000000|h|I|j

"|" is the seperator in the text, and the timestamp could be different
values and could happen at any place..

Is there any way to process the file easily?

Your help is very appreciated..



Relevant Pages

  • Re: Array size limit in Perl
    ... The data format is as follows, ... And my perl code is as follows. ... Have you tried printing this string rather than just executing it, ... examine the sorted array. ...
    (perl.beginners)
  • Re: Using References to Formats, Examining Scalars With Devel::Peek
    ... the format to be able to refer to it by another name didn't occur to me. ... Seems most of the fields are the same as for the rest of the Perl ... from integer to double and how frequently the string portions are updated. ... Using an operator or a built-in with a double and an int usually converts ...
    (comp.lang.perl.misc)
  • Text::Autoformat usage for a rookie
    ... I try to use Perl in my work to solve repetitive tasks. ... I now badger the group. ... I get a usage error. ... It seems as though people use it to format simple strings to ...
    (comp.lang.perl.misc)
  • Re: Implementing Storables STORABLE_freeze and STORABLE_thaw
    ... > Hello Perl People, ... > I'm interested in cloning some Perl objects that I've written, ... Whichever format conveys the necessary information to let you unfreeze ... and put whatever I needed for serialization into the list of refs that ...
    (comp.lang.perl.misc)
  • Re: Tool zur Dateiformat-Analyse
    ... einzelnen Teile rauskramen und dann dem ein oder anderen spezifischen ... CPAN Modul vorwerfen, sollte das kein größeres Problem sein. ... "man perl" liest sich schon durchaus beeindruckend. ... Das macht Sinn für große Dateien mit unbekanntem Format ...
    (de.comp.sys.mac.misc)