Sum of datetime différence... - Mailing list pgsql-sql

From Ed
Subject Sum of datetime différence...
Date
Msg-id 000901bfd181$544297e0$b48c29d1@citenet.net
Whole thread Raw
List pgsql-sql
Hi,

I would like to know what is the easiest way to add multiple difference of
datetime but show the result in hour and minute  something like :

table foo:

start datetime
end  datetime

I would like to do :

select sum(end-start) from foo;

but it gives me 3 days 12 hours 23 minutes...etc

I would like to see 84 hours and 23 minutes...

How can I do this?

PS:  Is there a way to know which week of the year a current day is in?

Frédéric Boucher
Ed@jetumele.com




pgsql-sql by date:

Previous
From: "Stephan Szabo"
Date:
Subject: Re: Problem with subquery in CHECK constraint.
Next
From: Brian Powell
Date:
Subject: Help with inserts into Views