Re: function for date difference ? - Mailing list pgsql-general

From Stephane Bortzmeyer
Subject Re: function for date difference ?
Date
Msg-id 200006301436.QAA18372@ezili.sis.pasteur.fr
Whole thread Raw
In response to function for date difference ?  (jprem <jprem@srmsoft.co.in>)
List pgsql-general
On Friday 30 June 2000, at 14 h 54, the keyboard of jprem <jprem@srmsoft.co.in>
 wrote:

>  is there any built-in function to find the difference between any two
> dates in postgresql 6.5.3 ?

You can do substraction on dates.

SELECT ending - starting FROM intervals;
SELECT * FROM intervals WHERE ending - starting > 86400::timespan;

If you want something more sophisticated, you have to read the dates into a
program (I do it with Perl) and use this program to perform all the operations
you wish.



pgsql-general by date:

Previous
From: "Mitch Vincent"
Date:
Subject: Re: Large Tables(>1 Gb)
Next
From: mikeo
Date:
Subject: Re: Large Tables(>1 Gb)