From: | "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Time Input with format HH.MM.SS |
Date: | 2007-02-01 15:43:20 |
Message-ID: | 20070201154320.GL18319@a-kretschmer.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
am Thu, dem 01.02.2007, um 16:13:28 +0100 mailte A. Kretschmer folgendes:
> am Thu, dem 01.02.2007, um 15:58:08 +0100 mailte DANTE Alexandra folgendes:
> > Hello List,
> >
> > Is it possible to import in a TIMESTAMP(6) field a timestamp in which
> > the format of hour is HH.MM.SS (and not HH:MM:SS) ?
> > In the documentation, at
> > http://www.postgresql.org/docs/8.2/interactive/datatype-datetime.html#DATATYPE-TIMEZONES,
> > I didn't find this format.
> > So can I think that it is not possible to import this kind of hour in
> > PostgreSQL ? (I work with PostgreSQL 8.2.0).
> > Any workaround to do that ?
>
> test=# select replace('2007-01-01 12.00.00', '.',':')::timestamp;
> replace
> ---------------------
> 2007-01-01 12:00:00
> (1 row)
If you want to COPY such data in a table, you can first COPY the data in
a temp. table with TEXT-columns and then insert from this table the data
into the destination table and convert the data using the way above.
Or, convert the input-data with usual text-tools like sed or awk.
HTH, Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net
From | Date | Subject | |
---|---|---|---|
Next Message | DANTE Alexandra | 2007-02-01 15:45:43 | Re: Time Input with format HH.MM.SS |
Previous Message | Hiltibidal, Robert | 2007-02-01 15:33:59 | Compilation Error AIX |