Re: Date Arithmetic in PL/pgSql

Поиск
Список
Период
Сортировка
От John DeSoi
Тема Re: Date Arithmetic in PL/pgSql
Дата
Msg-id F3706A17-4BBD-4658-9CF3-BE1C6CDCE812@pgedit.com
обсуждение исходный текст
Ответ на Date Arithmetic in PL/pgSql  ("Lane Van Ingen" <lvaningen@esncc.com>)
Ответы Re: Date Arithmetic in PL/pgSql  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
On Aug 8, 2005, at 4:23 PM, Lane Van Ingen wrote:

> I am trying to do some simple date arithmetic. All I wanted to do
> is take a
> timestamp
> (example: 2005-08-08 16:15:30) without a timezone, and substract a
> computed
> number
> of minutes and seconds (such as 310 seconds) from it; keep running
> into
> problems.


select '2005-08-08 16:15:30'::timestamp - '310 seconds'::interval;
       ?column?
---------------------
2005-08-08 16:10:20
(1 row)



John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


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

Предыдущее
От: "Lane Van Ingen"
Дата:
Сообщение: Date Arithmetic in PL/pgSql
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Date Arithmetic in PL/pgSql