Re: bug with >to_char('2007-12-31'::DATE, 'YYYYIW')< - Mailing list pgsql-general

From Tom Lane
Subject Re: bug with >to_char('2007-12-31'::DATE, 'YYYYIW')<
Date
Msg-id 11309.1196825878@sss.pgh.pa.us
Whole thread Raw
In response to bug with >to_char('2007-12-31'::DATE, 'YYYYIW')<  (Daniel Schuchardt <daniel_schuchardt@web.de>)
List pgsql-general
Daniel Schuchardt <daniel_schuchardt@web.de> writes:
> LOLL2=# SELECT  to_char('2007-12-31'::DATE, 'YYYYIW');
>  to_char
> ---------
>  200701
> (1 row)

> 2007-12-31 should be week 2008-01

No, it shouldn't.  YYYY is defined to deliver calendar year.
For ISO year use IYYY.

            regards, tom lane

pgsql-general by date:

Previous
From: Paul Lambert
Date:
Subject: Re: Archiving problem on Windows
Next
From: Tom Lane
Date:
Subject: Re: Transaction isolation and constraints