| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Tony Caduto <tony_caduto(at)amsoftwaredesign(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Weird PG 8.1.3 date error |
| Date: | 2006-12-13 16:59:18 |
| Message-ID: | 8945.1166029158@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Tony Caduto <tony_caduto(at)amsoftwaredesign(dot)com> writes:
> I have a user who is getting this error on a 8.1.3 server when importing
> some data from a dbf file:
> ERROR: date/time field value out of range: "08-01-2006"
He needs to set DateStyle to match the expected field order.
regression=# show datestyle;
DateStyle
-----------
ISO, MDY
(1 row)
regression=# select '08-01-2006'::date;
date
------------
2006-08-01
(1 row)
regression=# set datestyle TO ymd;
SET
regression=# select '08-01-2006'::date;
ERROR: date/time field value out of range: "08-01-2006"
HINT: Perhaps you need a different "datestyle" setting.
regression=#
He might also want to use tools that don't suppress the HINT part of an
error message ...
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2006-12-13 17:01:06 | Re: Online index builds |
| Previous Message | Marc Evans | 2006-12-13 16:58:36 | Re: dynamic plpgsql question |