Re: Week number

From: Markus Bertheau <twanger(at)bluetwanger(dot)de>
To: Wodzu <wodzu(at)wodzus(dot)prv(dot)pl>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Week number
Date: 2001-11-28 14:13:43
Message-ID: 1006956823.4770.45.camel@entwicklung01.cenes.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 2001-11-28 at 13:09, Wodzu wrote:
> I'm novice in PostgreSQL.

Then pgsql-novice is the correct list to ask this kind of question.
> I want to obtain current week number.
> Under PHP I try:
>
> $query = "SELECT EXTRACT(WEEK FROM NOW)";
> $result= pg_exec($dbconn,$query);

select date_part('week', CURRENT_TIMESTAMP);

Markus Bertheau

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 2001-11-28 14:30:46 Re: Call for platform testing
Previous Message Albert Bartoszko 2001-11-28 14:07:51 Rules