On Wed, Sep 21, 2011 at 11:17 PM, Eric Vollnogel <edvollno...@dstsystems.com> wrote: > The date_part('isoyear', some_column) function is not always returning the > correct result. See below:
See http://www.postgresql.org/docs/8.4/static/functions-datetime.html : "Each ISO year begins with the Monday of the week containing the 4th of January, so in early January or late December the ISO year may be different from the Gregorian year. See the week field for more information." So ISO year 2011 starts on Monday the 3rd of January. If you want the Gregorian year, just user 'year' instead of 'isoyear'. -- Guillaume -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs