Extract giving wrong week of year
От | Ben Primrose |
---|---|
Тема | Extract giving wrong week of year |
Дата | |
Msg-id | df5f54d230b61e4d6a3c9161c3f7ca06@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: Extract giving wrong week of year
|
Список | pgsql-general |
All,
I’m seeing some odd behavior from the extract function. Any idea why extract would think January 3rd of next year is the 53rd week of the year?
Thanks
Ben
[bprimrose@primrose partitioning]$ psql
Null display is "¤".
Line style is unicode.
Output format is wrapped.
Timing is on.
psql (9.3.9)
Type "help" for help.
bprimrose@home=> select extract (week from '2016-01-03 00:01:00'::timestamp);
date_part
───────────
53
(1 row)
Time: 1.128 ms
bprimrose@home=> select version();
version
─────────────────────────────────────────────────────────────────────────────────────────────────────────────
PostgreSQL 9.3.9 on x86_64-redhat-linux-gnu, compiled by gcc (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6), 64-bit
(1 row)
В списке pgsql-general по дате отправления: