Hello 2010/6/9 Andre Lopes <lopes80an...@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 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general