From: Roberto Mello <rmello@cc.usu.edu>
To: pgsql-sql@postgresql.org
Subject: Time difference without intervals
Date: Fri, 8 Nov 2002 11:20:02 -0700
Message-ID: <20021108182002.GC25961@cc.usu.edu> (raw)
I saw this question on another PG mailing list, and I don't know how to
answer. I've tried casting the interval to a timestamp, but that doesn't
seem to be supported in 7.2. Does anyone have an answer?
Is there any way to make a timestamp difference operation not return an
interval? I'd like to get hours, minutes and seconds only, not the "1 day"
or whatnot.
lbn-dev=# select now() - '2002-11-07 7:42'::timestamp;
?column?
-----------------------
1 day 02:01:57.987838
(1 row)
Thanks,
-Roberto
--
+----| Roberto Mello - http://www.brasileiro.net/ |------+
+ Computer Science Graduate Student, Utah State University +
+ USU Free Software & GNU/Linux Club - http://fslc.usu.edu/ +
TAGLINE NO ESPELHO ยค OHLEPSE ON ENILGAT
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: rmello@cc.usu.edu
Subject: Re: Time difference without intervals
In-Reply-To: <20021108182002.GC25961@cc.usu.edu>
* 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