Re: Date conversion using day of week
| От | Steve Crawford |
|---|---|
| Тема | Re: Date conversion using day of week |
| Дата | |
| Msg-id | 4D91FBE7.9020906@pinpointresearch.com обсуждение исходный текст |
| Ответ на | Date conversion using day of week (Marc Munro <marc@bloodnok.com>) |
| Ответы |
Re: Date conversion using day of week
|
| Список | pgsql-general |
On 03/29/2011 08:07 AM, Marc Munro wrote:
> 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
Based on running the queries in 9.0, it's behavior that has been corrected:
select to_date('Mon1-13-Tue', 'YYYY-IW-DY');
ERROR: invalid combination of date conventions
HINT: Do not mix Gregorian and ISO week date conventions in a
formatting template.
Cheers,
Steve
В списке pgsql-general по дате отправления: