## Re: Converting interval to numeric?

From: "Sal Dkj" bruno(at)wolff(dot)to pgsql-novice(at)postgresql(dot)org Re: Converting interval to numeric? 2005-02-12 00:38:23 BAY18-F6F9A130F46960362AAA16D4680@phx.gbl (view raw, whole thread or download thread mbox) 2005-02-11 01:48:06 from "Sal Dkj"  2005-02-11 04:58:25 from Bruno Wolff III   2005-02-12 00:38:23 from "Sal Dkj"   2005-02-14 18:45:01 from "Rodolfo J(dot) Paiz"    2005-02-14 21:09:05 from Bruno Wolff III pgsql-novice
```Bruno, thanks.

>From: Bruno Wolff III <bruno(at)wolff(dot)to>
>To: Sal Dkj <saldkj(at)hotmail(dot)com>
>CC: pgsql-novice(at)postgresql(dot)org
>Subject: Re: Converting interval to numeric?
>Date: Thu, 10 Feb 2005 22:58:25 -0600
>
>On Fri, Feb 11, 2005 at 01:48:06 +0000,
>   Sal Dkj <saldkj(at)hotmail(dot)com> wrote:
> > Hello, I'm trying to calculate the difference between two timestamps and
> > have the return value in minutes.
> >
> > So, for instance:
> > Time 1 = 1/1/2005 12:00
> > Time 2 = 1/2/2005 12:00
> >
> > If you subtract Time 1 from Time 2, it returns an interval value of '1
> > day'. Extracting hours or minutes from this obviously gives 0.  What's
>the
> >  trick here?
>
>EXTRACT the EPOCH from the difference of the timestamps. This will give
>you the elapsed times in seconds (as a float8 I think).

_________________________________________________________________
Dont just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/

```

### pgsql-novice by date

 Next: From: dim Date: 2005-02-12 08:49:48 Subject: plpgsql Previous: From: apocalypznow Date: 2005-02-11 23:08:19 Subject: Serious connection problem