On 01/31/2011 04:50 PM, Emi Lu wrote:
> Good morning,
>
> Is there an existing method to get days between two dates?
>
> For example,
>
> select '2010-01-01'::date - '1999-10-12'::date
>
> Returns how many days.
>
> Thank you,
>
> --
> Lu Ying
>
Hi !
Yes there is : date '2001-10-01' - date '2001-09-28' returns integer '3'
(days) as said here :
http://www.postgresql.org/docs/8.4/interactive/functions-datetime.html
--
Tovo J. RABEMANANTSOA
INRA - UR1263 EPHYSE
71, Av. Edouard Bourlaux
F-33140 Villenave d'Ornon - France
Téléphone : +33 5 57 12 24 09