date interval

Поиск
Список
Период
Сортировка
От Keith Worthington
Тема date interval
Дата
Msg-id 20050504202906.M2048@narrowpathinc.com
обсуждение исходный текст
Ответы Re: date interval  (Frank Bax <fbax@sympatico.ca>)
Список pgsql-novice
Hi All,

I need to generate a column representing the interval passed in months and
restrict the returned data to those intervals matching 12, 24, 36 and 48.

So far by reading the documentation I have gotten to these expressions.  But I
do not know how to get the number of months out of this.

        current_date - tbl_detail.ship_by_date AS elapsed_x
        age(tbl_detail.ship_by_date) AS elapsed_y

Once I get that I am thinking that I can use the same expression with the IN
to get the desired results.

Any help on the expressions would be appreciated.

Kind Regards,
Keith

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

Предыдущее
От: John DeSoi
Дата:
Сообщение: Re: Output of PL/PGSQL?
Следующее
От: Frank Bax
Дата:
Сообщение: Re: date interval