## Calculating the number of months between two dates

From: Brian Ghidinelli sfpug(at)postgresql(dot)org Calculating the number of months between two dates 2005-08-26 02:06:02 430E790A.5040100@pukkasoft.com (view raw or whole thread) 2005-08-26 02:06:02 from Brian Ghidinelli  2005-08-28 19:03:06 from elein(at)varlena(dot)com (elein) sfpug
```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

```

### sfpug by date

 Next: From: elein Date: 2005-08-28 19:03:06 Subject: Re: Calculating the number of months between two dates Previous: From: Josh Berkus Date: 2005-08-15 16:37:58 Subject: Two Jobs in San Mateo