Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Translating day of the week
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00753743
Message ID:
00753754
Views:
27
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--
Previous
Reply
Map
View

Click here to load this message in the networking platform