Re: [SQL] adding time to a datetime field ... how?

Поиск
Список
Период
Сортировка
От Margarit Nickolov
Тема Re: [SQL] adding time to a datetime field ... how?
Дата
Msg-id Pine.BSI.4.05L.9912151559510.19740-100000@developer.digsys.bg
обсуждение исходный текст
Ответ на adding time to a datetime field ... how?  (The Hermit Hacker <scrappy@hub.org>)
Ответы Re: [SQL] adding time to a datetime field ... how?  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-sql
select start_time,start_time+acctsessiontime::timespan from log;

On Wed, 15 Dec 1999, The Hermit Hacker wrote:

> 
> 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 по дате отправления:

Предыдущее
От: The Hermit Hacker
Дата:
Сообщение: adding time to a datetime field ... how?
Следующее
От: Vladimir Terziev
Дата:
Сообщение: Re: [SQL] adding time to a datetime field ... how?