<p>If I had a phone number like this  </p>

<pre><code>string phone = "6365555796";
</code></pre>

<p>Which I store with only numeric characters in my database <strong>(as a string)</strong>, is it possible to output the number like this:  </p>

<pre><code>"636-555-5796"
</code></pre>

<p>Similar to how I could if I were using a number:  </p>

<pre><code>long phone = 6365555796;
string output = phone.ToString("000-000-0000");
</code></pre>

<p>I've tried searching and all I could find online were numeric formatting documents.</p>

<p>The reason I ask is because I think it would be an interesting idea to be able to store only the numeric values in the DB and allow for different formatting using a Constant string value to dictate how my phone numbers are formatted. Or am I better off using a number for this?</p>

<p>EDIT: The question is to format a string that contains numbers, not a number itself.</p>

Why not just do something like this?
```
```
string phoneText = "6365555796";
long phoneNum = long.Parse(phoneText);
string output = phoneNum.ToString("000-000-0000");
```
```