Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to convert Currency to Numeric?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
How to convert Currency to Numeric?
Miscellaneous
Thread ID:
00317162
Message ID:
00317162
Views:
66
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
Next
Reply
Map
View

Click here to load this message in the networking platform