From: reinoud@xs4all.nl
To: pgsql-sql@postgresql.org
Subject: Re: Date manipulation
Date: Thu, 31 May 2001 19:21:32 GMT
Message-ID: <3b1899a5.3897885953@news.xs4all.nl> (raw)
References: <200105311714.f4VHEbW24511@mail.ldssingles.com>
On Thu, 31 May 2001 17:24:54 +0000 (UTC), mark@zserve.com (Mark)
wrote:
>
>How does one perform date manipulation within SQL? For example, SQL
>Server has a dateadd() function that takes a date part, scalar, and the
>date to manipulate.
>
>I have a query that determines the number of days that are between now
>and a particular date that looks something like this:
>
>select datediff (dd, now (), column) as difference_in_days from ...
>
>Anything available short of coding my own function?
Yes: see
http://www.postgresql.bit.nl/devel-corner/docs/user/functions-formatting.html
and
http://www.postgresql.bit.nl/devel-corner/docs/user/functions-datetime.html
--
__________________________________________________
"Nothing is as subjective as reality"
Reinoud van Leeuwen reinoud@xs4all.nl
http://www.xs4all.nl/~reinoud
__________________________________________________
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: reinoud@xs4all.nl
Subject: Re: Date manipulation
In-Reply-To: <3b1899a5.3897885953@news.xs4all.nl>
* 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