×
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.
What bothers me is that dates don't round trip well. Does March 31st
less one month, plus one month, equal March 31st?
If you need real exact, you could always take an approach of:
/free
Select;
When (Month = 'JAN') And (Func = 'Sub');
Daycnt = 92; //dec =31 + Nov = 30 + Oct =31
When (Month = 'JAN') And (Func = 'Add') and (not leapyear);
Daycnt = 90; //(Jan = 31 + Feb = 28 + Mar = 31)
When (Month = 'JAN') And (Func = 'Add') and (leapyear);
Daycnt = 91; //(Jan = 31 + Feb = 29 + Mar = 31)
When (Month = 'FEB') And (Func = 'Sub');
Daycnt = 92; //dec =31 + Nov = 30 + Jan =31
When (Month = 'FEB') And (Func = 'Add') and (not leapyear);
Daycnt = 89; //(Apr = 30 + Feb = 28 + Mar = 31)
When (Month = 'FEB') And (Func = 'Add') and (leapyear);
Daycnt = 90; //(Feb = 29 + Mar = 31 + Apr 30 )
//etc.
EndSL
This could also be done with a compile time table-but the logic wouldn't
have as clear.
- Jim
As an Amazon Associate we earn from qualifying purchases.