General information
Category:
Coding, syntax & commands
>if the character is not = to a -, it replaces the character with a 0. for example, the first character is a 1, so it looks at that,
>sees it's not a -, and then attempts to replace it with a 0. i would like my end result to be 000-000-0000. but, i dont' know how to do the REPLACE part of the code. any clues?
Why not build a seperate string during the process and use that at the end? Otherwise, the REPLACE you're looking for is hte Stuff() fucintions. Also, if all the characters are digits (no letters) you can also do something like this:
?CHRTRAN('123-456-7890', '123456789', REPLICATE('0', 9))
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only