/ Published in: VB.NET
URL: http://codefinds.blogspot.com/2008/12/format-phone-number.html
It's important that the newPn var that you pass into the Convert.ToInt64 function is in the xxxxxxxxxx format and that no characters are present.
Expand |
Embed | Plain Text
Dim pn As String = "(444) 444-444" Dim newPn As String = Replace(Replace(Replace(pn, "-", ""), "(", ""), ")", "") newPn = String.Format("{0:###-###-####}", Convert.ToInt64(newPn))
You need to login to post a comment.
