Re: Date Math

Поиск
Список
Период
Сортировка
От Rich Shepard
Тема Re: Date Math
Дата
Msg-id Pine.LNX.4.64.0705071054200.20021@salmo.appl-ecosys.com
обсуждение исходный текст
Ответ на Re: Date Math  (aklaver@comcast.net (Adrian Klaver))
Ответы Re: Date Math  (Rich Shepard <rshepard@appl-ecosys.com>)
Re: Date Math  (Adrian Klaver <aklaver@comcast.net>)
Список pgsql-general
On Mon, 7 May 2007, Adrian Klaver wrote:

> If term and process_time are stored as intervals then it will work. Also
> if they are stored as INTERVALS you can do CURRENT_DATE+process_time. In
> other words not have to declare the INTERVAL . Is date_issued stored as a
> date? If so it would not need to be cast.

Adrian,

   Here are the pertinent declarations in the DDL:

   date_issued DATE NOT NULL
     CONSTRAINT invalid_date
       CHECK (date_applied <= date_issued),
   term SMALLINT DEFAULT 1 NOT NULL,                  -- in years
   processing_time DEFAULT 180 NOT NULL SMALLINT,     -- in days

Thanks,

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

В списке pgsql-general по дате отправления:

Предыдущее
От: aklaver@comcast.net (Adrian Klaver)
Дата:
Сообщение: Re: Date Math
Следующее
От: Rich Shepard
Дата:
Сообщение: Re: Date Math