| From: | "Jan Bodey" <jan_bodey(at)hotmail(dot)com> |
|---|---|
| To: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Date comparison question |
| Date: | 2003-05-20 16:22:38 |
| Message-ID: | Law11-F4684J5kbuOAb0001655b@hotmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
Hi
I require a query that will see if a stored date is more than a certain
interval before the current date. Using an interval of 10 hours, the query
would be something like:
SELECT * FROM utable
WHERE now() - utimestamp > interval '10 hours';
The problem I am having is that the interval is not fixed, and I would like
to be able to store it as a value in a database table. The unit of the
interval can, however, be fixed, and will almost certainly be fixed to
hours.
I have not been able to find a way of doing what I require, does anybody
have any ideas to what I need to do?
Cheers.
Jan.
_________________________________________________________________
Tired of 56k? Get a FREE BT Broadband connection
http://www.msn.co.uk/specials/btbroadband
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Richard Huxton | 2003-05-20 16:36:47 | Re: how to do this query? |
| Previous Message | Jeff Boes | 2003-05-20 16:21:13 | Re: Performance on temp table inserts |