Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calendar
Message
De
25/08/2008 08:27:02
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
25/08/2008 05:06:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01341448
Message ID:
01341470
Vues:
17
This message has been marked as a message which has helped to the initial question of the thread.
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

* The following allows passing a date, or a number, as a parameter.
if type("tnMonth") = "D"
  tnMonth = month(tnMonth)
endif

do case
case tnMonth = 1
  return "January"
case tnMonth = 2
  return "February"
...
otherwise && Some wrong input, perhaps?
  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)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform