×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
On 1/6/2011 9:35 AM, Elbert Cook wrote:
DateDiff = %diff(Date1 : Date2 : *days) / 30;
It may be better to get the diff in months first, then get the number of
days left over, and divide that by 30 or probably better 30.5.
NumMonths = %diff(Date1 : Date2 : *months);
NumDays = %diff(Date1 : Date2 + %months(%int(NumMonths)) : *days);
NumMonths += NumDays / 30.5;
It depends what you want the answer to be for say the difference between
Feb 15 and March 15. Do you want that to be exactly one month, or do
you want that to be a partial month?
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.