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
Title:
How to Convert Currency type to Numeric
Environment versions
Visual FoxPro:
VFP 8 SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01000782
Message ID:
01000782
Views:
114
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
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn
Next
Reply
Map
View

Click here to load this message in the networking platform