Re: start and end of the week

From: Jean-Luc Lachance <jllachan(at)nsd(dot)ca>
To: "John Sebastian N(dot) Mayordomo" <quadratini(at)sni(dot)ph>
Cc: "Pgsql-Sql(at)Postgresql(dot) Org" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: start and end of the week
Date: 2002-09-26 15:55:48
Message-ID: 3D932E04.F8D09FDF@nsd.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

How about:

select now() - date_part( 'DOW', now()) as starts_on,
now() -date_part( 'DOW', now()) + 6 as ends_on;

"John Sebastian N. Mayordomo" wrote:
>
> How do I get the start and end date of the present week?
> Is this possible?
>
> For example this week
> Start = Sept. 22
> End = Sept. 28
>
> Thank you very much.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Bruno Wolff III 2002-09-26 16:20:29 Re: start and end of the week
Previous Message Andrew Perrin 2002-09-26 15:49:15 Re: SQL formatter?