Re: getting weekly total based on daily...

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: jerome <jerome(at)gmanmi(dot)tv>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: getting weekly total based on daily...
Date: 2003-01-27 03:31:42
Message-ID: 20030127033142.GA23375@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Jan 27, 2003 at 16:52:50 +0800,
jerome <jerome(at)gmanmi(dot)tv> wrote:
> i was wondering is there a built-in funtion that gets the weeknumber based on
> date..

area=> select extract(week from current_date);
date_part
-----------
4
(1 row)

This is the ISO week of the year. Week 1 is the week containing the first
Thursday of the year. Weeks go from Monday to Sunday.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Lincoln Yeoh 2003-01-27 04:09:43 Re: I was spoiled by the MySQL timestamp field
Previous Message Robert Boone 2003-01-27 03:01:25 idea for a backup system...