Date Problem on Imports to 7.2.1

Поиск
Список
Период
Сортировка
От Geoff Ellis
Тема Date Problem on Imports to 7.2.1
Дата
Msg-id FDCF842C8B1DD311833C0090277C04B518C98D@augusta.planmatics.co.uk
обсуждение исходный текст
Список pgsql-admin
We have some date problems when importing data into the PSQL system.  The
following example shows it happening:

Source file = spec.csv
2,1,08/06/99,29/07/99,1,1,A,'R' CONDITION,C,MA,,O,,,,,,,,,,WS000

When imported into Postgres, the data is shown as:
mss_live=# select id,cdate,mdate,code,type,category from spec_header limit 1
;
 id |         cdate          |         mdate          |     code      | type
| category
----+------------------------+------------------------+---------------+-----
-+----------
  2 | 1999-08-06 00:00:00+01 | 1999-07-29 00:00:00+01 | 'R' CONDITION | C
| MA
(1 row)

The data was imported with "copy table from 'path/to/file' delimiters ','
with '' as null.

As you can see, 08/06/99 (8th June 1999) has been converted to 1999-08-06
(6th August 1999), and 29/07/99 (29th July 1999) has been converted
correctly!

Is there a flag or setting within the database that will allow us to import
the date correctly?

thanks in anticipation..

Geoff Ellis


В списке pgsql-admin по дате отправления:

Предыдущее
От: "Geoff Ellis"
Дата:
Сообщение: Re: Date Problem on Imports to 7.2.1 [ SOLVED ]
Следующее
От: Franco Bruno Borghesi
Дата:
Сообщение: Re: [GENERAL] a problem