adding time to a datetime field ... how?

From: The Hermit Hacker <scrappy(at)hub(dot)org>
To: pgsql-sql(at)postgresql(dot)org
Subject: adding time to a datetime field ... how?
Date: 1999-12-15 13:31:59
Message-ID: Pine.BSF.4.21.9912150928390.8120-100000@thelab.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)hub(dot)org secondary: scrappy(at){freebsd|postgresql}.org

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Margarit Nickolov 1999-12-15 14:01:32 Re: [SQL] adding time to a datetime field ... how?
Previous Message Patrick JACQUOT 1999-12-15 10:37:45 Re: [SQL] SQL'92 web resources