From: | Konstantinos Agouros <elwood(at)agouros(dot)de> |
---|---|
To: | Rich Shepard <rshepard(at)appl-ecosys(dot)com> |
Cc: | Konstantinos Agouros <elwood(at)agouros(dot)de>, Andrew Gould <andrewgould(at)yahoo(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Sum(time) possible? |
Date: | 2001-11-03 18:02:20 |
Message-ID: | 20011103190220.A9379@rumba.agouros.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Sat, Nov 03, 2001 at 09:57:24AM -0800, Rich Shepard wrote:
> On Sat, 3 Nov 2001, Konstantinos Agouros wrote:
>
> > Yup. A little background the column hold the time someone works on a project.
> > At the end of the month I want to see the total time. If time is not the right
> > column type for this please let me know.
>
> Konstantin,
>
> I keep my time records as decimals (to the nearest quarter-hour). Then
> it's a simple matter to add 3.25, 7.5, and so on.
>
> If the time is clock time, perhaps you can convert it to decimal hours
> before summing.
Well I got to the point of doing extract (hour)*3600+extract(minute)*60+extract
(seconds) but then I have to recalculate this to a decent display. The user
will enter the data in the HH:MM:SS format so using intervals (which would
let postgres make easy calculations) would lead me to enter intervals 00:00:00-
HH:MM:SS or something like that. Maybe that's a better solutions. The question
is: Is time meant as Wall clock time because then it would make no sense that
it could be summed up.
Cheers,
Konstantin
>
> HTH,
>
> Rich
>
> Dr. Richard B. Shepard, President
>
> Applied Ecosystem Services, Inc. (TM)
> 2404 SW 22nd Street | Troutdale, OR 97060-1247 | U.S.A.
> + 1 503-667-4517 (voice) | + 1 503-667-8863 (fax) | rshepard(at)appl-ecosys(dot)com
> http://www.appl-ecosys.com
>
--
Dipl-Inf. Konstantin Agouros aka Elwood Blues. Internet: elwood(at)agouros(dot)de
Otkerstr. 28, 81547 Muenchen, Germany. Tel +49 89 69370185
----------------------------------------------------------------------------
"Captain, this ship will not survive the forming of the cosmos." B'Elana Torres
From | Date | Subject | |
---|---|---|---|
Next Message | cbbrowne | 2001-11-03 18:05:43 | Re: Sum(time) possible? |
Previous Message | Rich Shepard | 2001-11-03 17:57:24 | Re: Sum(time) possible? |