Page 1 of 1

[PostgreSQL] Inserting a pre-defined date format[solved-ish]

Posted: Fri Jun 29, 2007 8:02 am
by Jenk
Hello,

I have a task to migrate some data from CSV files to a PostgreSQL database, and currently I am having difficulty with the Date field on some of the tables - the format is

Code: Select all

D/M/YYYY HH:MM:SS
within the CSV's and PostgreSQL does not like this.

How do I specify a date format when importing a CSV file?

Thanks in advance.

Posted: Fri Jun 29, 2007 8:03 am
by feyd
Automated import, or PHP-driven?

Posted: Fri Jun 29, 2007 8:06 am
by Jenk
Automated (by means of "COPY table FROM '/some/path/file.csv' DELIMETERS ',' CSV;")

Posted: Mon Jul 02, 2007 5:32 am
by Jenk
Problem evaded.. I obtained the original MDB file, then exported via ODBC to PostgreSQL.