netcrawler
11-15-2004, 03:09 PM
Hi I need help with a telephone number script formater, I have tried a couple of ways but had no luck to achive what i am trying to do here is what I am trying to do:
I have a database with telephone number entries but the problem is that they do not have all the same format the format i want them to be is: (111)111-1111.
In the database the person(s) entering the info entered all kind of formats like 111-111-1111, (111)11111111, 111 111-1111 and so forth.
Is there a simple method that would read in all digits in a seperate string and strip all non numeric values to have the following 1111111111 then for example:
if in=7
write number in this format and add "-" 111-1111
if in > 7
write write number in this format and add "( )" and "-" to become (111)111-1111.
and so forth..
I dont know if im clear in what i am trying to achive but hope it helps to help me.
Thanks..
I have a database with telephone number entries but the problem is that they do not have all the same format the format i want them to be is: (111)111-1111.
In the database the person(s) entering the info entered all kind of formats like 111-111-1111, (111)11111111, 111 111-1111 and so forth.
Is there a simple method that would read in all digits in a seperate string and strip all non numeric values to have the following 1111111111 then for example:
if in=7
write number in this format and add "-" 111-1111
if in > 7
write write number in this format and add "( )" and "-" to become (111)111-1111.
and so forth..
I dont know if im clear in what i am trying to achive but hope it helps to help me.
Thanks..