Number of months between 2 dates
Pickering, John (NORBORD)
PICKERIJ@norbord.com
Thu, 4 Sep 2003 12:46:51 -0400
Terry
It depends on what you mean by a "month". If you'd be happy with how many 30
day chunks there are then something like the following should do it:
>define d-months int*5 &
> = floor( (days(to-date) - days(from-date)) / 30)
If you want to know how many whole calendar months then the problem gets a
whole lot messier. And we'd need to know if your dates are mmddyyyy or
ddmmyyyy!
Regards,
John "no relation" Pickering
-----Original Message-----
From: Terry Pickering [mailto:pickering@4j.lane.edu]
Sent: Thursday, September 04, 2003 12:17 PM
To: powerh-l@lists.swau.edu
Subject: Number of months between 2 dates
Does anyone have an algorithm around that would compute the number of full
MONTHS between two dates? Example is the number of months between 7/12/1968
and 10/8/2002.
Thanks!
____________________________
Terry Pickering