From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | Jean-Christian Imbeault <jc(at)mega-bucks(dot)co(dot)jp> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Date not being parsed as expected |
Date: | 2002-09-06 08:19:13 |
Message-ID: | 20020906181913.B32091@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)svana(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Jean-Christian Imbeault | 2002-09-06 08:33:58 | Re: Date not being parsed as expected |
Previous Message | Mourad Dhambri | 2002-09-06 07:52:50 | postgresql and VB |