Re: Date not being parsed as expected - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Date not being parsed as expected
Date
Msg-id 20020906181913.B32091@svana.org
Whole thread Raw
In response to Date not being parsed as expected  (Jean-Christian Imbeault <jc@mega-bucks.co.jp>)
List pgsql-general
On Fri, Sep 06, 2002 at 04:24:23PM +0900, Jean-Christian Imbeault wrote:
> The following insert:
>
> insert into t values('01-10-29')
>
> gives the following result in the DB:
>
> select * from t
>       d
> ------------
>   2029-01-10
>
> Why is the first part (01) being parsed as the month? The DateStyle is
> set to ISO (the default) so shoudln't the parser see xx-yy-zz as being
> year-month-day?

Wow. Talk about an ambiguous date! That could be:

1 October 2029       01/10/2029
January 10 2029      10/01/2029
2001-10-29           29/10/2001

I don't think ISO dates are allowed to abbreviate any portion, especially
the year, since that is what makes the date style clear and unambiguous.
Other than the ISO datestyle, is it set to European or US?

HTH,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> There are 10 kinds of people in the world, those that can do binary
> arithmetic and those that can't.

pgsql-general by date:

Previous
From: Mourad Dhambri
Date:
Subject: postgresql and VB
Next
From: Jean-Christian Imbeault
Date:
Subject: Re: Date not being parsed as expected