Re: "Bad date external representation"

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Lynna Landstreet <lynna(at)gallery44(dot)org>, pgsql-novice(at)postgresql(dot)org
Subject: Re: "Bad date external representation"
Date: 2003-06-22 05:18:13
Message-ID: 200306220518.h5M5IDq01216@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


So it is only the european setting that doesn't swap month/day? This is
getting confusing.

---------------------------------------------------------------------------

Tom Lane wrote:
> Lynna Landstreet <lynna(at)gallery44(dot)org> writes:
> > Some additional information with regard to this issue, in case it helps any.
>
> Fooling around with this, I discovered that the datestyle setting *does*
> make a difference --- which is surprising considering that this
> particular date is quite non-ambiguous. (There's a big flamewar in
> progress right now on pgsql-general that presumes the present behavior
> is to accept anything that is non-ambiguous. Looks like we don't have
> all our facts straight :-()
>
> regression=# set datestyle = 'iso, us';
> SET
> regression=# select '9/19/2002'::date;
> date
> ------------
> 2002-09-19
> (1 row)
>
> regression=# set datestyle = 'iso, euro';
> SET
> regression=# select '9/19/2002'::date;
> ERROR: Bad date external representation '9/19/2002'
>
> So the answer is probably to make sure you have the US sub-mode
> selected.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message William Mitchell Jr 2003-06-23 10:03:25 many text files
Previous Message Joe Conway 2003-06-22 01:06:16 Re: connectby(... pos_of_sibling)