Re: Time difference without intervals

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Roberto Mello <rmello(at)cc(dot)usu(dot)edu>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Time difference without intervals
Date: 2002-11-09 15:52:32
Message-ID: 20021109155232.GA18883@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Fri, Nov 08, 2002 at 16:11:05 -0500,
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Roberto Mello <rmello(at)cc(dot)usu(dot)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.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message LR 2002-11-09 16:51:40 execute a query in an other db
Previous Message Emmanuel Engelhart 2002-11-09 14:52:11 CREATE VIEW (dynamically)