Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
?Store YYYY+MM+DD in dbf without knowing date format?
Message
From
10/12/1999 14:03:32
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00301758
Message ID:
00301907
Views:
27
>>>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform