Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
?Store YYYY+MM+DD in dbf without knowing date format?
Message
 
À
10/12/1999 13:21:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00301758
Message ID:
00301873
Vues:
22
>>>I have the year, the month and the day in 3 different variable myear, mmonth and mday (char mode) and i don't know the current DATE format the user is using. How can I load this in a date field ?
>>>Thanks
>>>eric
>>
>>Replace DateField WITH EVALUATE("{^"+mYear+"/"+mMonth+"/"+mDay+"}")
>
>Jim, simplify a bit, and remember the new parameters for the DATE() function- very handy.

Erik,

Yes DATE()is handy but not when the vars are character. Which is worse;

Replace DateField WITH EVALUATE("{^"+mYear+"/"+mMonth+"/"+mDay+"}")

or

Replace DateField WITH DATE(VAL(mYear),VAL(mMonth),VAL(mDay))

In the first there is one function call and in the second there are four function calls.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform