On 14 Jan 2008 in macromedia.dreamweaver, _adrian wrote:
Quote:
Hmm.. that looks like it just cuts off by x numbers of characters..
I actually need to place the parentheses around the phone prefix,
and add the dash between the two other sets of numbers.. all form a
single string from the DB that otherwise looks like this:
2065551212 |
<%
DIM myNumber, myFormattedNumber
myNumber = "2065551212"
myFormattedNumber = "(" & mid(myNumber,1,3) & ") " & mid(myNumber,4,3) & "-" & mid(myNumber,7,4)
%>
<p>Number: <%= myNumber %></p>
<p>Formatted: <%= myFormattedNumber %></p>
--
Joe Makowiec
http://makowiec.net/
Email:
http://makowiec.net/contact.php