I am trying to import data from a CSV file into the postgresql 9.2 database using the psql \COPY (rather than COPY SQL).
The input .csv file contains a timestamped column in the format dd.mm.yyyy hh.mm.ss.
I installed the datestyle database in DMY using.
set datestyle 'ISO,DMY'
Unfortunately, when I run the \COPY :
\COPY gc_test.trace(numpoint,easting,northing,altitude,numsats,pdop,timestamp_mes,duration,ttype,h_error,v_error) FROM 'C:\data.csv' WITH DELIMITER ';' CSV HEADER ENCODING 'ISO 8859-1'
I get this error:
ERROR: date / time field value out of range: "11.16.2012 07:10:06"
TIP. Perhaps you need a different "datestyle" setting.
CONTEXT: trace COPY, line 2, column timestamp_mes: "11.16.2012 07:10:06"
What is wrong with datestyle?
jatobat
source share