pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruno Wolff III <bruno@wolff.to>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Roberto Mello <rmello@cc.usu.edu>
Cc: pgsql-sql@postgresql.org
Subject: Re: Time difference without intervals
Date: Sat, 9 Nov 2002 09:52:32 -0600
Message-ID: <20021109155232.GA18883@wolff.to> (raw)
In-Reply-To: <27705.1036789865@sss.pgh.pa.us>
References: <20021108182002.GC25961@cc.usu.edu>
	<27705.1036789865@sss.pgh.pa.us>

On Fri, Nov 08, 2002 at 16:11:05 -0500,
  Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Roberto Mello <rmello@cc.usu.edu> writes:
> > 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.
> 
> I think your complaint is not that you get an interval, but that you
> want it displayed differently.  See to_char() ...

I looked at to_char before suggesting extract. The problem is that to_char
will only return hours modulo days. His question implied that he was
going to have intervals longer than a day, so I don't believe to_char
will work.



view thread (6+ messages)  latest in thread

Message-ID: <20021109155232.GA18883@wolff.to>
Permalink:  ../20021109155232.GA18883@wolff.to/
Also on:    postgresql.org/message-id/20021109155232.GA18883@wolff.to

 · 

reply

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: bruno@wolff.to, tgl@sss.pgh.pa.us, rmello@cc.usu.edu
  Subject: Re: Time difference without intervals
  In-Reply-To: <20021109155232.GA18883@wolff.to>

* 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