Hello
2010/6/9 Andre Lopes <lopes80andre(at)gmail(dot)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