Re: 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: Re: select to_char(current_timestamp, 'YYYY-WW');
Date: 2010-11-05 00:28:19
Message-ID: AANLkTim3XNiXyud4s-vWuZwFKRxZK0NhDk7Hw23QhpPS@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Nov 5, 2010 at 1:21 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> WW is defined as starting the first week on the first day of the year.
> 2010 started on a Friday so the week number increments on Fridays.
>
> There are some other format codes with different behavior ...

Thank you, that is what I thought

But is there a format code for a week starting on Sunday or Monday?

Sorry, I can't find it at
http://www.postgresql.org/docs/8.4/interactive/functions-formatting.html

Regards
Alex

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alexander Farber 2010-11-05 00:48:54 Re: select to_char(current_timestamp, 'YYYY-WW');
Previous Message Carlo Stonebanks 2010-11-05 00:24:14 How do you control IMMUTABLE PG PROC results?