Re: IYYY: unexpected behaviour

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-bugs(at)postgresql(dot)org
Cc: "Zubkovsky, Sergey" <Sergey(dot)Zubkovsky(at)transas(dot)com>
Subject: Re: IYYY: unexpected behaviour
Date: 2006-10-12 17:01:42
Message-ID: 200610121901.43339.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Zubkovsky, Sergey wrote:
> SELECT to_char( '2006-01-01'::timestamp, 'IYYY-MM-DD' ) AS strange,
> to_char( '2006-01-02'::timestamp, 'IYYY-MM-DD' ),
> to_char( '2006-01-01'::timestamp, 'YYYY-MM-DD' );
>
> does produce unexpected result for column 'strange':
>
> strange | to_char | to_char
> ------------+------------+------------
> 2005-01-01 | 2006-01-02 | 2006-01-01

This is correct. January 1, 2006 belongs to 2005 in this "ISO" way of
counting.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Nick Johnson 2006-10-12 17:59:45 BUG #2690: GRANT does not allow periods in database or schema names
Previous Message Zubkovsky, Sergey 2006-10-12 16:11:06 IYYY: unexpected behaviour