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

From Joshua Moore-Oliva
Subject Re: Division of intervals.
Date
Msg-id 200303190602.25779.josh@chatgris.com
Whole thread Raw
In response to Re: Division of intervals.  (Bruno Wolff III <bruno@wolff.to>)
Responses Re: Division of intervals.  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
List pgsql-general
Thanks, that should work.

Hmm that gives me an idea... Maybe I'll try to make a date_ceil function
identical to date_part and submit it.

All this stuff currently just seems so messy!

Josh.

On March 19, 2003 06:13 am, Bruno Wolff III wrote:
> 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.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org


pgsql-general by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Division of intervals.
Next
From: Tom Lane
Date:
Subject: Re: ssl