How to return an INT4 subtracting dates?

From: Andre Lopes <lopes80andre(at)gmail(dot)com>
To: postgresql Forums <pgsql-general(at)postgresql(dot)org>
Subject: How to return an INT4 subtracting dates?
Date: 2010-06-09 10:57:59
Message-ID: AANLkTimzdwotUkXfX5SWT8-YalHEeKNs3lKQf2SsiwTV@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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,

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2010-06-09 11:02:46 Re: How to return an INT4 subtracting dates?
Previous Message Dimitri Fontaine 2010-06-09 09:38:56 Re: Cognitive dissonance