From: Stephen Quinney <stephen.quinney@computing-services.oxford.ac.uk>
To: pgsql-sql@postgresql.org
Subject: Timestamp manipulation
Date: Wed, 31 Mar 2004 11:41:27 +0100
Message-ID: <20040331104126.GB11932@computing-services.oxford.ac.uk> (raw)
I am having a bit of difficulty trying to find a solution to this
problem of manipulating timestamps and dates so I hope someone can
enlighten me.
I have a table which contains a column of type timestamp. For each row
I want to find out the dates for the beginning and end of the week
within which the timestamp lies.
e.g. 2004-04-09 16:00:00+01
The beginning of the week (sunday) is:
2004-04-4
and the end of the week (saturday) is:
2004-04-10
Any suggestions as to how to go about this would be great, thanks in
advance.
Stephen Quinney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: stephen.quinney@computing-services.oxford.ac.uk
Subject: Re: Timestamp manipulation
In-Reply-To: <20040331104126.GB11932@computing-services.oxford.ac.uk>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox