Re: Date Math

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Date Math
Date: 2007-05-07 22:19:19
Message-ID: Pine.LNX.4.64.0705071517070.20021@salmo.appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 7 May 2007, Tom Lane wrote:

> It might be that converting those columns to interval is the best answer,
> depending on what other processing needs to be done with them. But if Rich
> wants to leave them as numbers, the above is the best way to convert them
> to intervals on-the-fly.

Columns 'term' and 'process_time' converted to intervals. Just to confirm
my understanding of today's lesson:

SELECT permit_nbr, title, date_issued, term, process_time from Permits
WHERE date_issued + term) < (CURRENT_DATE + process_time + '2 week'::INTERVAL);

is now correct syntax and use?

Thanks all,

Rich

--
Richard B. Shepard, Ph.D. | The Environmental Permitting
Applied Ecosystem Services, Inc. | Accelerator(TM)
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ottavio Campana 2007-05-08 00:31:02 tokenize string for tsearch?
Previous Message Jonas Henriksen 2007-05-07 21:23:34 Re: Slow query and indexes...