From: | elwood(at)agouros(dot)de (Konstantinos Agouros) |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Sum(time) possible? |
Date: | 2001-11-07 06:43:52 |
Message-ID: | elwood.1005115331@news.agouros.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
In <3BE84D1E(dot)23C58E5(at)incentre(dot)net> guy(at)incentre(dot)net (Guy Fraser) writes:
>Hi
>Here are some of my preferances, that I have found to be easier to work with doing
>this.
>"Command Prompt, Inc." wrote:
>> discrete length of time in temporal units, and you can perform a sum() on
>> its values.
>>
>Yuk. Use reltime it has better conversions.
>"reltime" converts seconds to "int4" and vice versa.
> select reltime('-3600'::int4);
> reltime
>-----------
> 01:00 ago
>(1 row)
>select int4('1 day'::reltime);
> int4
>-------
> 86400
>(1 row)
>If you use intervals you first need to convert them to reltime.
Hmmm reltime also gets me seconds. But to get seomthing like:
200:5:2 meaning 200 hours, 5 minutes 2 seconds I have to define my own
function, correct?
Konstantin
--
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 | Micah Yoder | 2001-11-07 07:40:26 | Re: Sourceforge moving from PostgreSQL to Oracle |
Previous Message | tomasz konefal | 2001-11-07 06:27:19 | Re: Sourceforge on Oracle? |