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
Titre:
How to convert Currency to Numeric?
Divers
Thread ID:
00317162
Message ID:
00317162
Vues:
65
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform