Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Phone number
Message
De
12/05/2005 17:09:36
 
 
À
12/05/2005 17:01:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows 2000 SP4
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01013608
Message ID:
01013618
Vues:
12
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform