Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.
Moderator: General Moderators
Jenk
DevNet Master
Posts: 3587 Joined: Mon Sep 19, 2005 6:24 am
Location: London
Post
by Jenk » Fri Jun 29, 2007 8:02 am
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
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.
Last edited by
Jenk on Mon Jul 02, 2007 5:33 am, edited 1 time in total.
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Fri Jun 29, 2007 8:03 am
Automated import, or PHP-driven?
Jenk
DevNet Master
Posts: 3587 Joined: Mon Sep 19, 2005 6:24 am
Location: London
Post
by Jenk » Fri Jun 29, 2007 8:06 am
Automated (by means of "COPY table FROM '/some/path/file.csv' DELIMETERS ',' CSV;")
Jenk
DevNet Master
Posts: 3587 Joined: Mon Sep 19, 2005 6:24 am
Location: London
Post
by Jenk » Mon Jul 02, 2007 5:32 am
Problem evaded.. I obtained the original MDB file, then exported via ODBC to PostgreSQL.