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:06:37
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Replace more than one character at a time STRTRAN?
Miscellaneous
Thread ID:
00900695
Message ID:
00900695
Views:
66
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
.·*´¨)
.·`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"
Next
Reply
Map
View

Click here to load this message in the networking platform