I'd use the left mid and right functions and then string it all together.
There may be an easier way but I think this will work.  I've done something
similar to this.

<cfset first_part  = left(#database.phone_number#,3)>
<cfset second_part = mid(#database.phone_number#,4,3)>
<cfset third_part = right(#database.phone_number#,7,4)>

<cfset whole_phone = "(" & #first_part# & ")" & #second_part# & "-" &
#third_part#>


[EMAIL PROTECTED] wrote:

> I have a 10 digit# (1234567890) stored in a database. How to format it with
> cf tags or JS functions to get (123)456-7890? I know how toconvert it in
> sql.
>
> Thanks,
>
> Henry
>
> -------------------------------------------------------------------------
> This email server is running an evaluation copy of the MailShield anti-
> spam software. Please contact your email administrator if you have any
> questions about this message. MailShield product info: www.mailshield.com
>
> -----------------------------------------------
> To post, send email to [EMAIL PROTECTED]
> To subscribe / unsubscribe: http://www.dfwcfug.org
begin:vcard 
n:Lori;Beier,
x-mozilla-html:FALSE
url:www.ditchwitch.com
org:Ditch Witch
adr:;;1959 W. Fir;Perry;OK;73077;USA
version:2.1
email;internet:[EMAIL PROTECTED]
title:Web Systems Developer
x-mozilla-cpt:;-8736
fn:Beier, Lori
end:vcard

Reply via email to