Received: from developer.digsys.bg (man@developer.digsys.bg [192.92.129.11]) by hub.org (8.9.3/8.9.3) with ESMTP id JAA91862 for ; Wed, 15 Dec 1999 09:01:48 -0500 (EST) (envelope-from man@developer.digsys.bg) Received: from localhost (man@localhost) by developer.digsys.bg (8.9.0/8.9.0) with ESMTP id QAA19804; Wed, 15 Dec 1999 16:01:33 +0200 (EET) Date: Wed, 15 Dec 1999 16:01:32 +0200 (EET) From: Margarit Nickolov To: The Hermit Hacker cc: pgsql-sql@postgreSQL.org Subject: Re: [SQL] adding time to a datetime field ... how? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 > > > ************ > >