Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > SSN split

Reply
Thread Tools

SSN split

 
 
Ted Dawson
Guest
Posts: n/a
 
      09-11-2004
ASP/Access

One of my fields is the customer's social security number, all originally
entered as a 9-character string. How can I split and display that into 3-2-4
format?


 
Reply With Quote
 
 
 
 
Aaron [SQL Server MVP]
Guest
Posts: n/a
 
      09-11-2004
set rs = conn.execute("SELECT SSN From Table")
ssn = rs(0)
response.write left(ssn, 3) & "-" & mid(ssn, 4, 2) & "-" & right(ssn, 4)

--
http://www.aspfaq.com/
(Reverse address to reply.)




"Ted Dawson" <(E-Mail Removed)> wrote in message
news:#Y$(E-Mail Removed)...
> ASP/Access
>
> One of my fields is the customer's social security number, all originally
> entered as a 9-character string. How can I split and display that into

3-2-4
> format?
>
>



 
Reply With Quote
 
 
 
 
Stefan Berglund
Guest
Posts: n/a
 
      09-11-2004
On Sat, 11 Sep 2004 14:43:36 -0500, "Ted Dawson"
<(E-Mail Removed)> wrote:
in <#Y$(E-Mail Removed)>

>ASP/Access
>
>One of my fields is the customer's social security number, all originally
>entered as a 9-character string. How can I split and display that into 3-2-4
>format?
>


Not all SSNs are created equal! A perfectly valid substitute,
for instance, is the federal tax id # which can be a variety of
several formats including your favored 3-2-4 format.

---
Stefan Berglund
 
Reply With Quote
 
Ted Dawson
Guest
Posts: n/a
 
      09-12-2004
Perfect! Thank you.





"Aaron [SQL Server MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> set rs = conn.execute("SELECT SSN From Table")
> ssn = rs(0)
> response.write left(ssn, 3) & "-" & mid(ssn, 4, 2) & "-" & right(ssn, 4)
>
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
>
>
> "Ted Dawson" <(E-Mail Removed)> wrote in message
> news:#Y$(E-Mail Removed)...
>> ASP/Access
>>
>> One of my fields is the customer's social security number, all originally
>> entered as a 9-character string. How can I split and display that into

> 3-2-4
>> format?
>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Display SSN DavidC ASP .Net 0 08-02-2010 08:53 PM
How to encrypt SSN in querystring? Jeff ASP .Net 4 06-11-2010 08:32 AM
remove dash in ssn with sprintf Carson C Programming 19 08-10-2006 05:04 PM
must I surrender SSN to sell photos? peter Digital Photography 77 05-31-2005 01:49 AM
SSN Dmitri Shvetsov ASP .Net 0 04-06-2004 11:27 PM



Advertisments