Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replace more than one character at a time STRTRAN?
Message
From
04/05/2004 10:12:56
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00900695
Message ID:
00900697
Views:
21
Thanks Sergey. I looked up CHRTRAN() in help, but I didn't see where it would replace more than one value. I missed that! I tested the same code using STRTRAN() and mvalue remained the same with no substitutions... That's my memory for ya! Useless! :o)

Thanks again!

>Tracy
>
? CHRTRAN(MVALUE, "$,", "")
>
>>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.
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform