Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Phone number
Message
From
12/05/2005 17:09:36
 
 
To
12/05/2005 17:01:59
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows 2000 SP4
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01013608
Message ID:
01013618
Views:
10
>How to clear the phone number
>
>i have this tel. 809-888-9595 and i need this number in this format 8098889595
>
>i try this.
>
>(STRTRAN("809-888-4818",SET("Separator"),""))
>
>thx

No, SET SEPARATOR is for thousand separator, you must use:
STRTRAN("809-888-4818","-","")
or
CHRTRAN("809-888-4818","-","")

***UPDATE
I think CHRTRAN is better because you can remove any uneccessary char with that string.
I can't remember who suggest this (please appologise me), but this is perfect if you want ONLY the digits:
m.Phone = "809-888-4818"
CHRTRAN(m.Phone, CHRTRAN(m.Phone,"1234567890",""),"")
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform