Re: Date not being parsed as expected

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Date not being parsed as expected
Дата
Msg-id 20020906181913.B32091@svana.org
обсуждение исходный текст
Ответ на Date not being parsed as expected  (Jean-Christian Imbeault <jc@mega-bucks.co.jp>)
Список 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 по дате отправления:

Предыдущее
От: Mourad Dhambri
Дата:
Сообщение: postgresql and VB
Следующее
От: Jean-Christian Imbeault
Дата:
Сообщение: Re: Date not being parsed as expected