Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Formatting a SSN
Message
 
To
26/10/2005 16:26:48
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01062399
Message ID:
01062414
Views:
13
Patrick,
Your temp string has 10 digits :)

The code below should do what you want:
string ssn = "123456789";
MessageBox.Show(ssn.Insert(3,"-").Insert(6,"-"));
Einar

>Do anyone know of a simple way to convert a 9 digit string to a SSN format?
>
>For example:
>
>string temp = "1234567890";
>MessageBox.Show(temp.ToString("000-00-0000"));
>
>Of course, the above does not work, but there should be an easy way of doing this.
>
>Thanks,
>Pat Moran
Semper ubi sub ubi.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform