adding time to a datetime field ... how?

Поиск
Список
Период
Сортировка
От The Hermit Hacker
Тема adding time to a datetime field ... how?
Дата
Msg-id Pine.BSF.4.21.9912150928390.8120-100000@thelab.hub.org
обсуждение исходный текст
Ответы Re: [SQL] adding time to a datetime field ... how?  (Margarit Nickolov <man@developer.digsys.bg>)
Re: [SQL] adding time to a datetime field ... how?  (Vladimir Terziev <vlady@school.digsys.bg>)
Список pgsql-sql
I hate coming up with subjects...

I have a table with two fields: start_time::datetime and
acctsessiontime::int4...I want to add the second to the first, to give me
a stop_time...

if I do:

select start_time,start_time+acctsessiontime from log;

I get a stop_time 'acctsessiontime' days after start_time, instead of
'acctsessiontime' seconds later...

Is there some way of telling it to pass seconds instead of days?

Thanks

Marc G. Fournier                   ICQ#7615664               IRC Nick: Scrappy
Systems Administrator @ hub.org 
primary: scrappy@hub.org           secondary: scrappy@{freebsd|postgresql}.org 



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

Предыдущее
От: Patrick JACQUOT
Дата:
Сообщение: Re: [SQL] SQL'92 web resources
Следующее
От: Margarit Nickolov
Дата:
Сообщение: Re: [SQL] adding time to a datetime field ... how?