Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replace more than one character at a time STRTRAN?
Message
 
 
To
04/05/2004 10:06:37
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00900695
Message ID:
00900696
Views:
30
This message has been marked as the solution to the initial question of the thread.
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.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform