Re: Get interval in months

Поиск
Список
Период
Сортировка
От Gerhard Heift
Тема Re: Get interval in months
Дата
Msg-id 20081110153312.GB11099@toaster.kawo1.rwth-aachen.de
обсуждение исходный текст
Ответ на Re: Get interval in months  ("David Spadea" <david.spadea@gmail.com>)
Список 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

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Gerhard Heift
Дата:
Сообщение: Logging in function with exception
Следующее
От: "Andrus"
Дата:
Сообщение: Re: Optimizing IN queries