Re: adding times togeather

Поиск
Список
Период
Сортировка
От scott.marlowe
Тема Re: adding times togeather
Дата
Msg-id Pine.LNX.4.33.0304281639070.14672-100000@css120.ihs.com
обсуждение исходный текст
Ответ на Re: adding times togeather  (ed despard <despareg@clarkson.edu>)
Список pgsql-general
On Mon, 28 Apr 2003, ed despard wrote:

> what i have is two columns that represent the times for sections of a
> race, so i have column A that is say 0:20:23 and i have column B that
> is 0:21:45 and i want to have a column that is A+B where that would be
> 0:42:18 in this case.

Store them as intervals and you can do that pretty easily:

create table th (n interval, p interval);
CREATE TABLE
marl8412=# insert into th values ('00:02:23','00:03:43');
INSERT 4505763 1
marl8412=# select n+p as time from th;
  time
----------
 00:06:06


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

Предыдущее
От: ed despard
Дата:
Сообщение: Re: adding times togeather
Следующее
От: "Nigel J. Andrews"
Дата:
Сообщение: Re: adding times togeather