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
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Database:
Visual FoxPro
Divers
Thread ID:
01000782
Message ID:
01000785
Vues:
13
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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform