Re: Time Input with format HH.MM.SS

From: DANTE Alexandra <Alexandra(dot)Dante(at)bull(dot)net>
To: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>, pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Time Input with format HH.MM.SS
Date: 2007-02-01 15:45:43
Message-ID: 45C20B27.7030909@bull.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thank you Andreas, I had thought about this solution but in my case, it
is not really possible to do that...
I am converting an Oracle database to PostgreSQL 8.2.0 via ora2pg which
allows me to extract the tables, data, ...
The timestamp extracted from Oracle have the format "DD-MON-YY
HH.MI.SSXFF AM" and I am trying to import them in a TIMESTAMP(6) via a
"COPY" command in PostgreSQL.

I tried to modify "lc_time" and others "lc_*" variables to import this
format but I didn't find the good solution...

How can I import these dates without using the "replace" function ?

Any suggestions ?
Regards,
Alexandra

A. Kretschmer wrote:

>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)
>
>
>Andreas
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Sullivan 2007-02-01 15:48:34 Re: Compilation Error AIX
Previous Message A. Kretschmer 2007-02-01 15:43:20 Re: Time Input with format HH.MM.SS