Time Intervals - Mailing list pgsql-sql

From Michael Richards
Subject Time Intervals
Date
Msg-id 3C6A9A0D.000015.04483@ns.interchange.ca
Whole thread Raw
Responses Re: Time Intervals  ("Ross J. Reedstrom" <reedstrm@rice.edu>)
Re: Time Intervals  (Jason Earl <jason.earl@simplot.com>)
List pgsql-sql
I've got a rather odd problem that I can't seem to solve easily with 
the given date manipulation functions.

I've got an expiry timestamp and a renewal interval. If something has 
expired it gets renewed as the expiry + renewal * n
Where n is the smallest number that will cause the calculation to 
result in the future.

So if I've got a resource that is renewed by the hour and it expired 
last week then I need to add on enough hours so its new expiry will 
be up to 1 hour in the future. Only trouble is this renewal period 
can be anything from minutes to months and it may have expired up to 
6 months ago.

If I could convert the timestamp into a julian of some sort perhaps I 
could do the math that way.

Any ideas?

-Michael
_________________________________________________________________   http://fastmail.ca/ - Fast Secure Web Email for
Canadians

pgsql-sql by date:

Previous
From: Srikanth Rao
Date:
Subject: remove
Next
From: "Ross J. Reedstrom"
Date:
Subject: Re: Time Intervals