| From: | Lynna Landstreet <lynna(at)gallery44(dot)org> |
|---|---|
| To: | <pgsql-novice(at)postgresql(dot)org> |
| Subject: | Re: "Bad date external representation" - solved |
| Date: | 2003-06-20 20:07:39 |
| Message-ID: | BB18E1CB.41E%lynna@gallery44.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-novice |
on 6/18/03 7:37 PM, Lynna Landstreet at lynna(at)gallery44(dot)org wrote:
> I just got the following error when attempting to use the \copy command in
> psql to import data from a text file into a PostgreSQL table:
>
> ERROR: copy: line 1, Bad date external representation '9/19/2002'
>
> I tried setting the datestyle to SQL and US using "set datestyle", but it
> didn't help. Anyone have any idea what the problem might be?
Well... turns out my initial intuition was half correct, anyway. It *was* a
US vs European datestyle issue! When I reversed the month and day, it worked
fine. What I can't figure out is why saying SET DATESTYLE TO 'US'; in psql
didn't work. That was the *first* thing I tried!
Oh well. At least I know how to fix the problem - I just have to change the
date formats before exporting the records. The fact that I now feel like a
complete moron for not trying reversing the month and day much sooner is
beside the point, really... :-/
Lynna
--
Resource Centre Database Coordinator
Gallery 44
www.gallery44.org
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nabil Sayegh | 2003-06-20 21:38:13 | connectby(... pos_of_sibling) |
| Previous Message | Laura Nichols | 2003-06-20 19:42:07 | Name limitation question |