Mohammed, I avoid using cmonth(), because the result is dependent on the runtime version installed. Specifically, cmonth() gives me the months in English, and I want them in Spanish. So, I create a personalized cMonth function, which I call MyCMonth(). Something like this:
lparameters tnMonth
if type("tnMonth") = "D"
tnMonth = month(tnMonth)
endif
do case
case tnMonth = 1
return "January"
case tnMonth = 2
return "February"
...
otherwise
return "???"
endcase
Of course, my own version of the function returns the months in Spanish - I left them in English here, for clarity.
>yes thank you,
>
>
>>>thank you,
>>>
>>>is there away to get the month as feb,,jan, oct.... only
>>>
>>>>>hi all
>>>>>
>>>>>*** ActiveX Control Event ***
>>>>>THISFORM.TEXT7.VALUE=TTOD(THIS.OBJECT.VALUE)&&result is 10/02/2008
>>>>>
>>>>>i need to convertit to 10-feb-2008
>>>>>
>>>>>thank you
>>>>
>>>>?Transform(THISFORM.TEXT7.VALUE,'@YL')
>>
>>AFAIK you must code it
>>ldDate=THISFORM.TEXT7.VALUE
>>?Transform(Day(lddate)) + '-' + Left(Cmonth(ldDate),3) + '-' + Transform(Year(ldDate))
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)