Format a series of number as a phone number
How Can I Format a Series of Numbers as a Phone Number in vbscript?
ex: 4206322623 as (420) 632-2623?
Solved! Go to Solution.
I didn't use VB, but...
I just found this method:
so what I think you can do is split this string into an array -> and then combine it with a special sign
Use this very simple VBScript work,
The trick is to use number as string and thus you can do your format quite easily.
Function FormatPhone(str) FormatPhone = "(" + Left(str, 3) + ") " + Mid(str,4,3) + "-" + Right(str, 4) End Function
But this is assuming using only US centric fixed format.
Un sourire et ça repart