Hi All, In maintain Screen, I want to place a dropdown which will contain values of Previous 12 month end date and next 12 month end date in DD/MM/YYY format . i.e, As today date is 05/07/2012, the dropdown will contain 31/07/2011,31/08/2011,/30/09/2011,……………………30/06/2012,31/07/2012,31/08/2012,…………………………….31/05/2013, 30/06/2013,31/07/2013 values. How to achieve this? Please suggest.
Thanks in AdvanceThis message has been edited. Last edited by: Kerry,
.
.
Case Top
dateStack.meDate/a10;
.
.
popDates();
EndCase
.
.
case popDates
Declare (eomDate/dmyy; holdDate/dmyy; thisDate/HDMYYm; alphaDate/a10; point/a3; component/a1; i/i4; j/i4; Recurs/i4;);
$*
Get today and move to end of month
Note: Some date functions are different in Maintain, requiring an extra component
Dates can move directly into and out of Alpha format in Maintain
All components of date fuctions need to be variables
*$
Compute point = 'EOM'; component = 'M'; recurs = 25; thisDate = HGETC(8,thisDate); alphaDate = thisDate; holdDate = alphaDate; eomDate = DATEMOV(holdDate,point,eomDate);
$$ Populate stack from 12 months back to 12 months ahead
Repeat Recurs i = -12; j = 1;
dateStack(j).meDate = DATEADD(eomDate,component,i,holdDate);
endRepeat i = i + 1; j = j + 1;
EndCase
(Edit is just a tidy up…)This message has been edited. Last edited by: Alan B,