hi,
thank you,
i get error message Date/DateTime evaluated to an invalid value
i see at mytable it stop at 28/02/2005.
********************
can i insert via thisform.text2.value monthly not all of the year,and can i
replace only friday.at myfield .
>So you want to create a table with one record for every day in the year? If so, try this, not tested, but it should work. Replace yourDate and WEEKDAY with your field names.
>thisform.text2.value=01/01/2005 (DD/MM/YYYY date format?)
>lnMonth=month(thisform.text2.value)
>lnYear=year(thisform.text2.value)
>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)))
> 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 ,
>>i don't understand what you mean,
>>but i need to insert at my thisform.text2.value ctod("01/01/2005")
>>thanks.
>>>Is the month you enter, always less than a year from now?
>>>>hi,
>>>>thank you,
>>>>i try to do this as under ,it works as add 31 days,
>>>>but i need to replace dayname if the day name is friday,
>>>>and i want to add month(2) feb..to month(12),take care if thedays for every month is 31 , 30 or 29 or 28 if month is=2
>>>>
>>>>IF MONTH(thisform.text2.Value)=01
>>>> FOR n=1 TO 31
>>>> APPEND BLANK
>>>> endfor
>>>>endif
>>>>
>>>>>Hi Mohammed,
>>>>>
>>>>>I don't mean to be rude, but I don't understand what you want.
>>>>>Do you want 31 blank records? If so, under what conditions.
>>>>>Why do you mention Friday?
>>>>>Can you give us a better explanation?
>>>>>>hi all,
>>>>>>
>>>>>>i need help to insert 31 records at my table if month e.i =1,if day is friday insert(replace) at myfield rem friday
>>>>>>as
>>>>>>31 append blank
>>>>>>thanks.