Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
?Store YYYY+MM+DD in dbf without knowing date format?
Message
De
10/12/1999 14:03:32
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00301758
Message ID:
00301907
Vues:
26
>>>>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.

You're right- I missed the fact that they were character type.
Erik Moore
Clientelligence
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform