Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id AFABB476D50 for ; Thu, 26 Sep 2002 11:47:35 -0400 (EDT) Received: from beamish.nsd.ca (unknown [205.150.156.194]) by postgresql.org (Postfix) with ESMTP id F0763476D49 for ; Thu, 26 Sep 2002 11:47:34 -0400 (EDT) Received: (from smap@localhost) by beamish.nsd.ca (8.9.3/8.9.3) id LAA00915; Thu, 26 Sep 2002 11:47:33 -0400 X-Authentication-Warning: beamish.nsd.ca: smap set sender to using -f Received: from reddog.nsd.ca(192.168.101.30) by beamish.nsd.ca via smap (V2.1/2.1+anti-relay+anti-spam) id xma000913; Thu, 26 Sep 02 11:47:28 -0400 Received: from nsd.ca (jllachan-linux.nsd.ca [192.168.101.148]) by reddog.nsd.ca (8.8.7/8.8.7) with ESMTP id LAA20381; Thu, 26 Sep 2002 11:47:15 -0400 Message-ID: <3D932E04.F8D09FDF@nsd.ca> Date: Thu, 26 Sep 2002 11:55:48 -0400 From: Jean-Luc Lachance X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.9-31 i686) X-Accept-Language: en MIME-Version: 1.0 To: "John Sebastian N. Mayordomo" Cc: "Pgsql-Sql@Postgresql. Org" Subject: Re: start and end of the week References: <1033037809.16948.2.camel@tiger-work.sni.ph> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/324 X-Sequence-Number: 9601 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@postgresql.org