On Wed, Jul 4, 2018 at 9:55 AM, Michael Monscheuer <mm(at)digiperience(dot)de>
wrote:
> Team,
>
> Extracting the week from a date gives wrong results for the last two days
> of 2024.
>
> SELECT EXTRACT (WEEK FROM DATE '20241230');
>
> or
>
> SELECT EXTRACT (WEEK FROM DATE '20241231');
>
> both result in a value of 1
> which is wrong, obviously...
>
>
Not wrong. See the docs:
By definition, ISO weeks start on Mondays and the first week of a year
contains January 4 of that year.
So the first week of 2025 contains some days from 2024.
Cheers,
Jeff