Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to Convert Currency type to Numeric
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01000782
Message ID:
01000785
Views:
15
This message has been marked as the solution to the initial question of the thread.
MTON()
>It would seem simple enough. I am reading an Excell spreadsheet directly with VFP 8. Some of the columns in the .XLS file come over as currency type I guess because they are formatted in Excell with the dollar sign. In order to insert the values (m.cost1, etc.) into my table I need to convert them to numeric. In VFP 9 I could use cast() but this is 8. The only way I could find was to use:
>
>if type('mNumVal') = 'Y'
>  * Currency type
>  mNumVal = val(str(mNumVal,10,3))
>endif
>
>I was just wondering if there is a better way in VFP 8.
>TIA
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform