Re: Time manipulation..

Поиск
Список
Период
Сортировка
От scott.marlowe
Тема Re: Time manipulation..
Дата
Msg-id Pine.LNX.4.33.0211121316280.24879-100000@css120.ihs.com
обсуждение исходный текст
Ответ на Time manipulation..  ("Williams, Travis L, NPONS" <tlw@att.com>)
Список pgsql-general
On Tue, 12 Nov 2002, Williams, Travis L, NPONS wrote:

> If I have a date/time column using timestamp.. how can I manipulate the date/time easily.. like take the date/time
andadd 7 days to it and get the correct date.. or subtract 5 days.. or anything like that.. I can do it all in perl
(whichI have done in the past).. but I hate dealing with month/year roll overs..  

Assuming you have a date field, you should be able to do something like
this:

select datefield + 7 from table where id=1;

to get the date plus 7 days.

I tested it this time, and it seems to work in 7.2.3 as well as 7.3 beta.


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

Предыдущее
От: "scott.marlowe"
Дата:
Сообщение: Re: how do i insert a default value?
Следующее
От: "scott.marlowe"
Дата:
Сообщение: Re: Upgrade to dual processor machine?