Re: Get interval in months - Mailing list pgsql-general

From Gerhard Heift
Subject Re: Get interval in months
Date
Msg-id 20081110153312.GB11099@toaster.kawo1.rwth-aachen.de
Whole thread Raw
In response to Re: Get interval in months  ("David Spadea" <david.spadea@gmail.com>)
List pgsql-general
On Sat, Nov 08, 2008 at 07:44:45AM -0500, David Spadea wrote:
> Gerhard,
>
> Check out:
>
> http://www.postgresql.org/docs/8.3/interactive/functions-datetime.html
>
> In particular, look at 'age()' or 'justify_days()', but  I think age() is the
> one you want.
>
>
> SELECT age('2008-02-01'::timestamp, '2008-01-01'::timestamp) AS "1 month"
>
> Produces:  "1 mon"

This was the function I searched. Thank you.

Gerhard

Attachment

pgsql-general by date:

Previous
From: Gerhard Heift
Date:
Subject: Logging in function with exception
Next
From: "Andrus"
Date:
Subject: Re: Optimizing IN queries