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

Click here to load this message in the networking platform