Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-novice by date

Next:From: Oliveiros d'Azevedo CristinaDate: 2012-05-04 11:43:21
Subject: Re: Query to get the min of the total
Previous:From: Marta PĂ©rez RomeroDate: 2012-05-04 11:19:35
Subject: Re: Query to get the min of the total

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group