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

From Bruno Wolff III
Subject Re: Time manipulation..
Date
Msg-id 20021113010855.GA1126@wolff.to
Whole thread Raw
In response to Time manipulation..  ("Williams, Travis L, NPONS" <tlw@att.com>)
List pgsql-general
On Tue, Nov 12, 2002 at 14:35:26 -0500,
  "Williams, Travis L, NPONS" <tlw@att.com> 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..  

You can use intervals to do this. Intervals can specify a time difference
in years and months as well as days, hours, seconds, etc. The documentation
doesn't indicate which part is added first. A quick check indicates
that month, year gets added before day, hours, minutes, seconds, but
you might want to double check the code before relying on this.

pgsql-general by date:

Previous
From: Corey Gibbs
Date:
Subject: Good Job and Kudos to the Postgres Team
Next
From: Joe Tomcat
Date:
Subject: JDBC question: Creating new arrays