Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Currency data source
Message
From
01/07/2003 09:03:07
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00805658
Message ID:
00805660
Views:
28
This message has been marked as a message which has helped to the initial question of the thread.
>I have a textbox on my form, the datasource is a currency field, format $, inputmask 999,999,999.99. The program reads a file that has the numbers already formatted as $120,000 and sets the datasource to this number. Well the textbox display is "messed up". Should the datasource only have numeric values? Is there a function to strip currency and formatting characters to extract only the numeric characters.
>
>Brenda

I assume you are reading from a text-file.

You can strip undesired characters with strtran() or chrtran(). Chrtran() is easier to get rid of several characters. For instance, the following example will get rid of the "$" sign and the comma, maintaining digits, a decimal point, and possibly a negative sign:
? chrtran("$123,45.67", "$,", "")
HTH,

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform