
VBScript - Masking a phone number to (XXX) XXX-XXXX
function formatPhone(phone)
if (phone <> "")then
phone = "(" & Left(phone,3)& ")" & " " &
Mid(phone,4,3) & "-" & Right(phone,4)
else
phone = ""
end if
formatPhone = phone
End function
Quote:
>-----Original Message-----
>Hello,
>Is there a function in vbscript that allows me to mask a
>phone digit string into (XXX)XXX-XXXX.
>Thanks so much
>.