Re: start and end of the week - Mailing list pgsql-sql

From Jean-Luc Lachance
Subject Re: start and end of the week
Date
Msg-id 3D932E04.F8D09FDF@nsd.ca
Whole thread Raw
In response to start and end of the week  (John "Sebastian N. Mayordomo" <quadratini@sni.ph>)
Responses Re: start and end of the week
List 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@postgresql.org


pgsql-sql by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: start and end of the week
Next
From: Andrew Perrin
Date:
Subject: Re: SQL formatter?