From: Stijn Vanroye <s.vanroye@Farcourier.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-sql@postgresql.org
Subject: Re: Difference between two times as a numeric value in a stored procedure. [Scanned]
Date: Fri, 4 Jun 2004 16:44:57 +0200
Message-ID: <736CEAA26E7E3F48943458F760E7A326010CE4@fs1010.farcourier.com> (raw)
> "Stijn Vanroye" <s.vanroye@Farcourier.com> writes:
> > I can't seem to find a way to substract two time values (or
> > timestamp values) and get a numeric/float value. I always get the
> > INTERVAL datatype.
>
> extract(epoch from interval) may help.
>
> regards, tom lane
Indeed. I think I should kick myself for missing that, I have read that section af the manual four times or so, and missed it over and over again :)
Thanks for the help.
Regards,
Stijn Vanroye.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: s.vanroye@Farcourier.com, tgl@sss.pgh.pa.us
Subject: Re: Difference between two times as a numeric value in a stored procedure. [Scanned]
In-Reply-To: <736CEAA26E7E3F48943458F760E7A326010CE4@fs1010.farcourier.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox