Re: Time manipulation.. - Mailing list pgsql-general

From scott.marlowe
Subject Re: Time manipulation..
Date
Msg-id Pine.LNX.4.33.0211121316280.24879-100000@css120.ihs.com
Whole thread Raw
In response to Time manipulation..  ("Williams, Travis L, NPONS" <tlw@att.com>)
List 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 by date:

Previous
From: "scott.marlowe"
Date:
Subject: Re: how do i insert a default value?
Next
From: "scott.marlowe"
Date:
Subject: Re: Upgrade to dual processor machine?