Re: Problem with date calculations

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Cornelia Boenigk <poppcorn(at)cornelia-boenigk(dot)de>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Problem with date calculations
Date: 2004-01-10 22:54:20
Message-ID: 20040110145131.G19122@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Sat, 10 Jan 2004, Cornelia Boenigk wrote:

> I have a table with two fields, d1 timestamp and dur smallint.
> d1 is the starting date and dur is the duration. From this two fields
> I want to generate future dates for the whole table.

I'd suggest using something like:
d1 + dur * interval '1 month'
rather than attempting to do it via text.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Cornelia Boenigk 2004-01-10 23:02:12 Re: Problem with date calculations
Previous Message Cornelia Boenigk 2004-01-10 22:36:01 Problem with date calculations