Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Daniel Schuchardt <daniel_schuchardt@xxxxxx> 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

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux