Skip site navigation (1) Skip section navigation (2)

Re: Calculating the number of months between two dates

From: elein(at)varlena(dot)com (elein)
To: Brian Ghidinelli <brian(at)pukkasoft(dot)com>
Cc: sfpug(at)postgresql(dot)org
Subject: Re: Calculating the number of months between two dates
Date: 2005-08-28 19:03:06
Message-ID: 20050828190306.GV21179@varlena.com (view raw or flat)
Thread:
Lists: sfpug
Look for the answer to this in tomorrow's General Bits.

http://www.varlena.com/GeneralBits

--elein

On Thu, Aug 25, 2005 at 07:06:02PM -0700, Brian Ghidinelli wrote:
> 
> I'm having problems using timestamps and intervals to schedule recurring 
> events.  How can I test if today's date/timestamp is equal to a start 
> date plus some number of arbitrary intervals?  E.g., 3/30/05 + (X * 2 
> months) = 5/30, 7/30, 9/30, etc.
> 
> The main problem I'm having is that subtracting timestamps always 
> results in an interval of days rather than some combination of years, 
> months, days, etc.
> 
> Thanks for any pointers or ideas,
> 
> 
> Brian
> 

In response to

sfpug by date

Next:From: Josh BerkusDate: 2005-08-30 18:07:19
Subject: Next Meeting -- Sept. 14
Previous:From: Brian GhidinelliDate: 2005-08-26 02:06:02
Subject: Calculating the number of months between two dates

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group