Re: Sum(time) possible?

Поиск
Список
Период
Сортировка
От Konstantinos Agouros
Тема Re: Sum(time) possible?
Дата
Msg-id 20011103190220.A9379@rumba.agouros.de
обсуждение исходный текст
Ответ на Re: Sum(time) possible?  (Rich Shepard <rshepard@appl-ecosys.com>)
Ответы Re: Sum(time) possible?
Список 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@appl-ecosys.com
>                          http://www.appl-ecosys.com
>

--
Dipl-Inf. Konstantin Agouros aka Elwood Blues. Internet: elwood@agouros.de
Otkerstr. 28, 81547 Muenchen, Germany. Tel +49 89 69370185
----------------------------------------------------------------------------
"Captain, this ship will not survive the forming of the cosmos." B'Elana Torres

В списке pgsql-general по дате отправления:

Предыдущее
От: "Command Prompt, Inc."
Дата:
Сообщение: Re: how do the pro's do this? (still a newbie)
Следующее
От: "Command Prompt, Inc."
Дата:
Сообщение: CREATE TYPE delimiter?