Skip site navigation (1) Skip section navigation (2)

Re: Week number

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "Wodzu" <wodzu(at)wodzus(dot)prv(dot)pl>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Week number
Date: 2001-11-29 01:43:41
Message-ID: GNELIHDDFBOCMGBFGEFOMEJICAAA.chriskl@familyhealth.com.au (view raw or flat)
Thread:
Lists: pgsql-hackers
In 7.1.x, try:

SELECT EXTRACT (WEEK FROM CURRENT_DATE);

in older postgres maybe this:

SELECT EXTRACT (WEEK FROM DATE 'today');

Chris

> -----Original Message-----
> From: pgsql-hackers-owner(at)postgresql(dot)org
> [mailto:pgsql-hackers-owner(at)postgresql(dot)org]On Behalf Of Wodzu
> Sent: Wednesday, 28 November 2001 8:10 PM
> To: pgsql-hackers(at)postgresql(dot)org
> Subject: [HACKERS] Week number
> 
> 
> Hi all,
> 
> I'm novice in PostgreSQL.
> I want to obtain current week number.
> Under PHP I try:
> 
> $query = "SELECT EXTRACT(WEEK FROM NOW)";
> $result= pg_exec($dbconn,$query);
> 
> where: $dbconn - successful conection id
> But this give me an error message.
> Can somebody help me?
> Sorry for my english.
> 
> Thanks in advice.
> 
> Wodzu
> 
> 
> 
> 
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
> 


In response to

pgsql-hackers by date

Next:From: Christopher Kings-LynneDate: 2001-11-29 01:47:05
Subject: Re: Week number
Previous:From: Jim ButtafuocoDate: 2001-11-29 01:37:18
Subject: Re: 7.2beta3 on Digital Alpha

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group