thisform.text2.value=01/01/2005 (DD/MM/YYYY date format?) lnMonth=month(thisform.text2.value) && String: lnMonth=val(substr(thisform.text2.value,4,2)) && 01 lnYear=year(thisform.text2.value) && string: lnYear=val(substr(thisform.text2.value,7,4)) && 2005 lnDate=EVALUATE('{^'+STR(lnYear,4)+ '-' + TRANSFORM(lnMonth,'@L 99') + '-01}') DIMENSION laDOW(7) laDOW(1)='Monday' laDOW(2)='Tuesday' laDOW(3)='Wednesday' laDOW(4)='Thursday' laDOW(5)='Friday' laDOW(6)='Saturday' laDOW(7)='Sunday' FOR lnMonthCounter=1 to 12 FOR lnDayCounter=1 to VAL(DTOC(GOMONTH(lnDate,1)-DAY(lnDate))) && Number of days in the month APPEND BLANK Replace yourDate WITH EVALUATE('{^'+STR(lnYear,4)+ '-' + TRANSFORM(lnMonthCounter,'@L 99') + '-' + TRANSFORM(lnDayCounter,'@L 99') + '}') Replace WEEKDAY WITH laDoW(DOW(yourDate)) ENDFOR ENDFOR>hi ,
>>>IF MONTH(thisform.text2.Value)=01 >>> FOR n=1 TO 31 >>> APPEND BLANK >>> endfor >>>endif >>>>>>>Hi Mohammed,