CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 formating phone numbers

Print topic Send  topic

Author Message
ytoro
Posted: 10/25/2002, 6:20 AM

hi,
how can i format telephone numbers to show as (123) 123-1234 from access database format 1231231234
Nicole
Posted: 10/28/2002, 7:06 AM

Hello,
Try to use language specific string functions to split the string into several parts and then concatenate them into formatted string.
Each script language has its won set of string functions, so solution depends on language.
ytoro
Posted: 10/28/2002, 5:07 PM

thanks nicole i figured it out

lizabette
Posted: 10/29/2002, 9:31 AM

ytoro
Posted: 10/29/2002, 10:09 AM

select the phone number and create a server side/before show event and add custom code

myform.Phone.value= "("&left(myform.Phone.value,3)&") "&mid(myform.Phone.value,4,3)&"-"&right(myform.Phone.value,4)

It might not be the brightest of solutions but it is doing the job

ytoro
james
Posted: 11/30/2002, 10:01 PM


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.