pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Willem de Jong <Willumpie@NOSPAM.xs4all.nl>
To: pgsql-sql@postgresql.org
Subject: Re: sum ( time) problem
Date: Mon, 7 Jun 2004 06:09:32 +0000 (UTC)
Message-ID: <Xns95015355D7F61Jongdatdnaservicesdo@200.46.204.72> (raw)
References: <Xns94E7AEA1D11BBJongdatdnaservicesdo@200.46.204.72>
	<1084406549.228484@seven.kulnet.kuleuven.ac.be>
	<Xns94F687197CDCDJongdatdnaservicesdo@200.46.204.72>
	<20040601140334.GA24188@wolff.to>

I'm afraid it is the only solution...
Thanks for reply


bruno@wolff.to (Bruno Wolff III) wrote in news:20040601140334.GA24188
@wolff.to:

> On Thu, May 27, 2004 at 11:14:58 +0000,
>   Willem de Jong <Willumpie@xs4all.nl> wrote:
>> >>
>> >> If i do a sum(time) the result is like this '1 day 18:00:00'. But i'd
>> >> like to get a result like this '42:00:00'.
>> >>
>> >> How can i realise is by a query?
> 
> You can do something like the following: (not completely tested)
> select extract(epoch from sum(time))/3600 || ':' ||
>   extract(minutes from sum(time)) || ':' ||
>   extract(seconds from sum(time));
> 
> I am not sure if the above will work right for negative intervals.
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
> 
> 




view thread (6+ messages)

Message-ID: <Xns95015355D7F61Jongdatdnaservicesdo@200.46.204.72>
Permalink:  ../Xns95015355D7F61Jongdatdnaservicesdo@200.46.204.72/
Also on:    postgresql.org/message-id/Xns95015355D7F61Jongdatdnaservicesdo@200.46.204.72

 · 

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: Willumpie@NOSPAM.xs4all.nl
  Subject: Re: sum ( time) problem
  In-Reply-To: <Xns95015355D7F61Jongdatdnaservicesdo@200.46.204.72>

* 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