Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to Convert Currency type to Numeric
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
How to Convert Currency type to Numeric
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Database:
Visual FoxPro
Divers
Thread ID:
01000782
Message ID:
01000782
Vues:
112
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform