Import CSV with Dates & Times

From: James David Smith <james(dot)david(dot)smith(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Import CSV with Dates & Times
Date: 2012-05-04 11:38:12
Message-ID: CAMu32ACFQdub1O7DjcdtO4Z-HPk+hvj=vTt+fbsp6c7T8NyR1g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi,

I have a problem importing some data. I have created a table with a
column which is called scheduled_depart_time and has the data type
'TIMESTAMP'. When I try to import data from a CSV the data in that
column has values such as '17/11/2011 16:54:03'. I get an error of the
below:

ERROR: date/time field value out of range: "17/11/2011 15:17:00"
HINT: Perhaps you need a different "datestyle" setting.
CONTEXT: COPY ibus_17_11_2011, line 1, column scheduled_depart_time:
"17/11/2011 15:17:00"

Any sugestions please?

Thanks

James

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Oliveiros d'Azevedo Cristina 2012-05-04 11:43:21 Re: Query to get the min of the total
Previous Message Marta Pérez Romero 2012-05-04 11:19:35 Re: Query to get the min of the total