Re: Getting 2002-12-18T17:32:40-05:00 (ISO 8601) from to_date()

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Getting 2002-12-18T17:32:40-05:00 (ISO 8601) from to_date()
Дата
Msg-id 18619.1040312037@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Getting 2002-12-18T17:32:40-05:00 (ISO 8601) from to_date()  (Karl DeBisschop <kdebisschop@alert.infoplease.com>)
Список pgsql-general
Karl DeBisschop <kdebisschop@alert.infoplease.com> writes:
> Second is the 'T' after the date part (where you might otherwise have a
> space).

This seems to be a bug in the to_date parser:

regression=# select to_char(now(),'YYYY-MM-DDT HH24:MI:SS');
       to_char
----------------------
 2002-12-19T 10:32:05
(1 row)

regression=# select to_char(now(),'YYYY-MM-DD THH24:MI:SS');
       to_char
----------------------
 2002-12-19 T10:32:08
(1 row)

regression=# select to_char(now(),'YYYY-MM-DDTHH24:MI:SS');
        to_char
-----------------------
 2002-12-19THH24:32:10
(1 row)

If the first two both work, I don't see why the third case shouldn't ...

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: "Peter Gibbs"
Дата:
Сообщение: Re: Getting 2002-12-18T17:32:40-05:00 (ISO 8601) from to_date()
Следующее
От: "Peter Gibbs"
Дата:
Сообщение: Re: Getting 2002-12-18T17:32:40-05:00 (ISO 8601) from to_date()