Find all the dates in the calendar week?

From: Stephane Bortzmeyer <bortzmeyer(at)pasteur(dot)fr>
To: pgsql-general(at)postgresql(dot)org
Subject: Find all the dates in the calendar week?
Date: 2000-07-06 07:28:05
Message-ID: 200007060728.JAA22548@ezili.sis.pasteur.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


I have a table of events with a column which stores datetimes. I want to check
if a datetime is inside the current calendar week (i.e. from the previous
monday to the next sunday). The purpose is to SELECT all the events of the
week.

I cannot find a way to do it in SQL? Did I miss something?

[If there is no SQL way, I'll hack it in a Perl script. Code or suggestions
welcome.]

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mike Mascari 2000-07-06 07:48:48 Re: Partial indices
Previous Message Stephane Bortzmeyer 2000-07-06 07:21:13 Re: function for date difference ?