LPARAMETERS lnYear, lnMonth LOCAL ldDate, lnWeekNo, ldLastOfMonth CLEAR && Find the first of the month ldDate = DATE(lnYear, lnMonth, 1) ldLastOfMonth = GOMONTH(ldDate, 1) - 1 lnWeekNo = 1 DO WHILE ldDate < ldLastOfMonth ? "Week " + ALLTRIM(STR(lnWeekNo)) + " begins " + DTOC(ldDate) + "..." && Weeks must be at least 3 days ldDate = ldDate + 2 && Only + 2 because the current day && counts too! && Find the next Thursday DO WHILE DOW(ldDate) <> 5 && 5 = Thursday ldDate = ldDate + 1 ENDDO && Ok, so ldDate is a Thursay now. && Now we must check if the next week will have at && least 3 days IF ldLastOfMonth - ldDate < 3 && We must include the last days... ldDate = ldLastOfMonth ENDIF ? "Week " + ALLTRIM(STR(lnWeekNo)) + " ends on " + DTOC(ldDate) ? ldDate = ldDate + 1 lnWeekNo = lnWeekNo + 1 ENDDOHope this helps!