Re: Date manipulation

From: reinoud(at)xs4all(dot)nl (Reinoud van Leeuwen)
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Date manipulation
Date: 2001-05-31 19:21:32
Message-ID: 3b1899a5.3897885953@news.xs4all.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Thu, 31 May 2001 17:24:54 +0000 (UTC), mark(at)zserve(dot)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(at)xs4all(dot)nl
http://www.xs4all.nl/~reinoud
__________________________________________________

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Peter Eisentraut 2001-05-31 21:08:22 Re: Date manipulation
Previous Message Brian Powell 2001-05-31 17:06:00 Re: 7.1.1 Lock Problems on Views