>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)