Date conversion using day of week

Поиск
Список
Период
Сортировка
От Marc Munro
Тема Date conversion using day of week
Дата
Msg-id 1301411268.23783.6.camel@bloodnok.com
обсуждение исходный текст
Ответы Re: Date conversion using day of week  (Adrian Klaver <adrian.klaver@gmail.com>)
Re: Date conversion using day of week  (Steve Crawford <scrawford@pinpointresearch.com>)
Список pgsql-general
I'm trying to validate a day of the week, and thought that to_date would
do the job for me.  But I found a case where it cannot tell the
difference between sunday and monday.  Is this a bug or intended
behaviour?

dev=# select to_date('2011-13-Mon', 'YYYY-IW-DY');
  to_date
------------
 2011-03-28
(1 row)

dev=# select to_date('2011-13-Sun', 'YYYY-IW-DY');
  to_date
------------
 2011-03-28
(1 row)

dev=# select to_date('2011-13-Tue', 'YYYY-IW-DY');
  to_date
------------
 2011-03-29
(1 row)

This is on postgres 8.3.14.

__
Marc


Вложения

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

Предыдущее
От: Michael Leinartas
Дата:
Сообщение: Is pglesslog stable for use in 9.0?
Следующее
От: "A.M."
Дата:
Сообщение: Re: not like perl..