Re: Getting the week of a date

From: Richard Huxton <dev(at)archonet(dot)com>
To: "Kumar" <sgnerd(at)yahoo(dot)com(dot)sg>, "psql" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Getting the week of a date
Date: 2004-02-16 13:03:12
Message-ID: 200402161303.12330.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Monday 16 February 2004 12:10, Kumar wrote:
>
> test=# select date_trunc('week',current_date + ('5 month')::INTERVAL);
> ERROR: TIMESTAMP units 'week' not supported

Try EXTRACT(week FROM ...)

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Mark Roberts 2004-02-16 13:06:22 Date format problems
Previous Message Robert Creager 2004-02-16 12:43:20 Re: Getting the week of a date