From: | Joshua Moore-Oliva <josh(at)chatgris(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Division of intervals. |
Date: | 2003-03-19 11:02:25 |
Message-ID: | 200303190602.25779.josh@chatgris.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(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.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
From | Date | Subject | |
---|---|---|---|
Next Message | Bruno Wolff III | 2003-03-19 11:13:14 | Re: Division of intervals. |
Previous Message | James Gregory | 2003-03-19 11:00:27 | Referential Integrity problem |