Until you want to put in a phone number from any other country than the USA
of course.  Because it's only North America that uses the 3-3-4 format.  The
other countries in the world use a dazzling array of formats, some with area
codes, some without.  Here in Australia our phone numbers are anything from
5 to 11 digits.



Cheers,
Mike Kear
Windsor, NSW, Australia
AFP WebWorks


-----Original Message-----
From: Burcham, Steve [mailto:[EMAIL PROTECTED]]
Sent: Saturday, May 18, 2002 6:38 AM
To: CF-Talk
Subject: RE: Phone Number Format

Thanks Janine. I ended up going with the SQL. Worked great.


Thank you.

Steve Burcham
Webmaster - Field Support Team
RDO Equipment Co.
Phone (701) 239-8755
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>


-----Original Message-----
From: Janine Jakim [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 17, 2002 2:26 PM
To: CF-Talk
Subject: RE: Phone Number Format


in sql
 ('(' + SUBSTRING(AS.TELEPHONE, 1,3) + ') ' + SUBSTRING(AS.TELEPHONE,4,3) +
'-' + SUBSTRING(AS.TELEPHONE,7,4)) AS TELEPHONE

or as a cfset

<CFSET TELEPHONE="(#left(SchoolInfo.TELEPHONE,3)#)
#mid(School.TELEPHONE,4,3)#-#mid(School.TELEPHONE,7,4)#">

-----Original Message-----
From: Burcham, Steve [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 17, 2002 3:27 PM
To: CF-Talk
Subject: Phone Number Format


I have a column in a SQL database called COMP_PHONE, it is a char data type.
Right now the phone number is in the database as 1234567890.

I want to output this as (123) 456-7980 in my application. I have tried
using NumberFormat to no avail. I get an error message when I run the code
stating the format is invalid.

Here is the code I was using:

#NumberFormat(COMP_PHONE, '(999)999-9999')#

Any suggestions would be appreciated.

Thank you.

Steve Burcham
Webmaster - Field Support Team
RDO Equipment Co.
Phone (701) 239-8755
 <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]





______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to