>I have a character value in a field:
>
>MVALUE = "$9,999.99"
>
>and I need to change it to numeric 9999.99 with no formatting
>
>I need to replace the "$" with '' and the commas with ''. I cannot get STRTRAN() to replace two values instead of just one at a time. Is it possible or is there another function that will do it? I need a one line statement to do the replacement. The user could have entered the value in any means:
>
>9,999.99
>9999.99
>$9999.99
>
>I can only have a one line statement IIF(... or something along those lines to convert a value before it is passed to another app. The app that receives the value needs it to be numeric only for correct formatting.
>
>TIA!!!
>Tracy
hi Tracy,
I'm afraid you'll end up with 2 strtran.
but chrtran will do
?chrtran(mvalue, '$,', '')
Gregory