Re: Division of intervals. - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: Division of intervals.
Date
Msg-id 20030319111314.GA702@wolff.to
Whole thread Raw
In response to Re: Division of intervals.  (Joshua Moore-Oliva <josh@chatgris.com>)
Responses Re: Division of intervals.  (Joshua Moore-Oliva <josh@chatgris.com>)
List pgsql-general
On Wed, Mar 19, 2003 at 01:03:50 -0500,
  Joshua Moore-Oliva <josh@chatgris.com> wrote:
> I guess that it does for this problem..  But I have other applications that
> require the number of days...  and that gets a lot more complex to work out.

If you subtract the timestamps the interval will have 0 for the month/year
part and you can extract the epoch from it to get the time in seconds.
This can be divided by 24*60*60 to get days.

pgsql-general by date:

Previous
From: "Nigel J. Andrews"
Date:
Subject: Re: ssl
Next
From: Joshua Moore-Oliva
Date:
Subject: Re: Division of intervals.