subtratcing dates

From: Fran Fabrizio <ffabrizio(at)exchange(dot)webmd(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: subtratcing dates
Date: 2001-05-04 21:50:59
Message-ID: 3AF32443.CB2E50FE@exchange.webmd.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hello all,

I have a table that has two columns, tstamp of type timestamp, and limit
of type int.

I want to have a query that tells me whether or not the timestamp is
within 'limit' minutes of the current time.

so, something like:

select tstamp > now() + '-60 minute' from log;

except i need the 60 to be the value of the 'limit' column instead so...

select tstamp > now() + '-limit minute' from log;

which of course doesn't work. I can't seem to get it right no matter
what I try. Any ideas? Thanks!

-Fran

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2001-05-04 21:52:56 Re: Re: a primer on trigger?
Previous Message Doug McNaught 2001-05-04 21:47:39 Re: When DST occurs