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

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 (view raw or flat)
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

pgsql-sql by date

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

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