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: (view raw, whole thread or download thread mbox)
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


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-2017 The PostgreSQL Global Development Group