Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Translating day of the week
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00753743
Message ID:
00753754
Vues:
32
Hi Moises,

You can write a function that you can call from anywhere as you can call CDOW().
FUNCTION cdowbr
LPARAMETERS tdDate
LOCAL laDowName[7]
laDowName[1] = "Domingo"
laDowName[2] = "Segunda-Feira"
laDowName[3] = "Terça-Feira"
laDowName[4] = "Quarta-Feira"
laDowName[5] = "Quinta-Feira"
laDowName[6] = "Sexta-Feira"
laDowName[7] = "Sábado"
RETURN laDowName[DOW(tdDate)]
If you've VFP7 or later it could be even shorter.
FUNCTION cdowbr
LPARAMETERS tdDate
LOCAL laDowName[7]
ALINES(laDowName, "Domingo,Segunda-Feira,Terça-Feira,Quarta-Feira,Quinta-Feira,Sexta-Feira,Sábado", .T., ",")
RETURN laDowName[DOW(tdDate)]
>VFP has only English day of the week
>I used the programa below to convert
>I give it to a friend and he says he
>got (variable dsp not found)
>
< snip >
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform