Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
How to convert Currency to Numeric?
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement