while(rangeCnt <(EndDateRange-startDateRange)){
Needs to be
while(rangeCnt <= (EndDateRange-startDateRange)){
-----Original Message-----
From: Preston A. Larimer [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 17, 2003 12:25 PM
To: [EMAIL PROTECTED]
Subject: RE: RE : [development-axapta] Re: Select date range
Oops, I should run these things before I mail them, there where to mistakes in the prev Job……
static void pl_scratch(Args _args)
{
str dateRange = '2003-10-13..2003-10-17,2003-09-15,2003-08-15,';
boolean firstLoop = true;
int dblDots;
int start;
int end;
int sLen;
int incomingDateFormat = 321;
int outputDateFormat = 213;
str subString;
date startDateRange;
date endDateRange;
int rangeCnt;
;
sLen = strlen(dateRange);
do{
subString = '';
start = end+1;
end =strFind(dateRange, ',', start, firstLoop ? sLen: sLen-start);
subString = strRTrim(strLTrim(subStr(dateRange,start, end ? end-start: sLen -
start)));
dblDots = strFind(subString, '..', 1,strLen(subString));
if(dblDots){
startDateRange = str2Date(strRTrim(strLTrim(subStr(subString, 1,
dblDots-1))), incomingDateFormat);
endDateRange = str2Date(strRTrim(strLTrim(subStr(subString, dblDots+2,
strLen(subString)-dblDots+2))), incomingDateFormat);
rangeCnt = 0;
while(rangeCnt <= (EndDateRange-startDateRange)){
//startDateRange += rangeCnt; //----Opps
info(date2str(startDateRange +rangeCnt,outPutDateFormat, 2, 4, 2, 4,
4));
++rangeCnt;
} }
else //---------------Added
info(date2str(str2Date(subString, incomingDateFormat),outPutDateFormat, 2,
4, 2, 4, 4));firstLoop = false;
} while(end);
}
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Yahoo! Groups Sponsor ADVERTISEMENT
click here
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

