Re: Division of intervals.

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Joshua Moore-Oliva <josh(at)chatgris(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org
Subject: Re: Division of intervals.
Date: 2003-03-19 11:13:14
Message-ID: 20030319111314.GA702@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Mar 19, 2003 at 01:03:50 -0500,
Joshua Moore-Oliva <josh(at)chatgris(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message James Gregory 2003-03-19 11:26:50 Re: Referential Integrity problem
Previous Message Joshua Moore-Oliva 2003-03-19 11:02:25 Re: Division of intervals.