Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to convert Currency to Numeric?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00317162
Message ID:
00317168
Vues:
18
You can try the MTON() function.

Joe


>Does anyone know of a way (VFP Function?) to convert a currency field to a numeric field?
>
>I have a table that I want to extract data from that has currency fields in it. For some reason when I use the ODBC drivers to mail-merge a document with MS Word, Word sees the currency fields as "$#### ##" - no decimal point. It then adds the cents back into the original number, free of charge. So if you wanted to display $2510.50, it would actually display $2560. Everything works fine with a regular numeric field.
>
>I know that it's possible if I did it like:
>SELECT VAL(STR(balance,10,2) FROM customers...
>
>Is there a better / faster way?
>
>Thanks,
>
>-Matt
Joseph C. Kempel
Systems Analyst/Programmer
JNC
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform