select to_char(current_timestamp, 'YYYY-WW');

From: Alexander Farber <alexander(dot)farber(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: select to_char(current_timestamp, 'YYYY-WW');
Date: 2010-11-05 00:15:48
Message-ID: AANLkTimbWGqO=HKX4GsTfFKjZSFBUnHBV30oe99aA_L+@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

sorry for the stupid question, but why has the week number changed
from 44 to 45 this night? It is Friday, 2010-11-05 01:10, but I get now:

pref=> SELECT to_char(current_timestamp, 'YYYY-WW');
to_char
---------
2010-45
(1 row)

pref=> SELECT CURRENT_DATE;
date
------------
2010-11-05
(1 row)

pref=> SELECT CURRENT_TIME;
timetz
-------------------
01:12:00.65546+01
(1 row)

# date
Fri Nov 5 01:13:57 CET 2010
# cat /etc/*release
CentOS release 5.5 (Final)
# rpm -qa|grep -i postgres
compat-postgresql-libs-4-1PGDG.rhel5
postgresql-libs-8.4.5-1PGDG.rhel5
compat-postgresql-libs-4-1PGDG.rhel5
postgresql-docs-8.4.5-1PGDG.rhel5
postgresql-8.4.5-1PGDG.rhel5
postgresql-libs-8.4.5-1PGDG.rhel5

Regards
Alex

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2010-11-05 00:21:43 Re: select to_char(current_timestamp, 'YYYY-WW');
Previous Message Jorge Godoy 2010-11-05 00:02:57 Re: Linux