orther
asked on
SQL Reporting format Phone Field
I have a stored procedure that returns a a string as 12345678900000. I use this stored procedure in my SQL Server Report. I want to display it is the format as (123) 456-7890.
I found the following wihch returns the value: (123) 456-7890000
=System.Text.RegularExpres sions.Rege x.Replace( Fields!Ven dorPhone.V alue, "(\d{3})[ -.]*(\d{3})[ -.]*(\d{4})", "($1) $2-$3")
What can i change in this value to only display the first 10 digits? In other words, how can I drop the 4 remaining zeros?
How can I do this in the SQL Report? We're using SQL 2008
I found the following wihch returns the value: (123) 456-7890000
=System.Text.RegularExpres
What can i change in this value to only display the first 10 digits? In other words, how can I drop the 4 remaining zeros?
How can I do this in the SQL Report? We're using SQL 2008
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Fast too
=left(System.Text.RegularE