Re: How to return an INT4 subtracting dates?

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: How to return an INT4 subtracting dates?
Дата
Msg-id AANLkTikcBAK-h-XDuShUKFoNm1JeFmGwzY_-ZHYq7XA4@mail.gmail.com
обсуждение исходный текст
Ответ на How to return an INT4 subtracting dates?  (Andre Lopes <lopes80andre@gmail.com>)
Список pgsql-general
Hello

2010/6/9 Andre Lopes <lopes80andre@gmail.com>:
> Hi,
>
> I need to return an int4 subtracting two dates, but returns me an interval.
>
> select
> end_date - now() as interger_number
> from hist_anuncios
>
> How to return an integer out of this?
>
>
> Best Regards,
>
>

postgres=# select '2010-06-18'::date - CURRENT_DATE;
 ?column?
----------
        9
(1 row)

Regards

pavel Stehule

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

Предыдущее
От: Andre Lopes
Дата:
Сообщение: How to return an INT4 subtracting dates?
Следующее
От: Raymond O'Donnell
Дата:
Сообщение: Re: How to return an INT4 subtracting dates?