SSN split

Discussion in 'ASP General' started by Ted Dawson, Sep 11, 2004.

  1. Ted Dawson

    Ted Dawson Guest

    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?
    Ted Dawson, Sep 11, 2004
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:#Y$...
    > 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?
    >
    >
    Aaron [SQL Server MVP], Sep 11, 2004
    #2
    1. Advertising

  3. On Sat, 11 Sep 2004 14:43:36 -0500, "Ted Dawson"
    <> wrote:
    in <#Y$>

    >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
    Stefan Berglund, Sep 11, 2004
    #3
  4. Ted Dawson

    Ted Dawson Guest

    Perfect! Thank you.





    "Aaron [SQL Server MVP]" <> wrote in message
    news:...
    > 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" <> wrote in message
    > news:#Y$...
    >> 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?
    >>
    >>

    >
    >
    Ted Dawson, Sep 12, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dmitri Shvetsov

    SSN

    Dmitri Shvetsov, Apr 7, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    618
    Dmitri Shvetsov
    Apr 7, 2004
  2. Carson

    remove dash in ssn with sprintf

    Carson, Aug 9, 2006, in forum: C Programming
    Replies:
    19
    Views:
    614
    Al Balmer
    Aug 10, 2006
  3. Jeff
    Replies:
    4
    Views:
    668
    Cubaman
    Jun 11, 2010
  4. DavidC

    Display SSN

    DavidC, Aug 2, 2010, in forum: ASP .Net
    Replies:
    0
    Views:
    445
    DavidC
    Aug 2, 2010
  5. Kamaluokeakua

    Global Address/Phone/SSN[Country ID]

    Kamaluokeakua, Oct 1, 2004, in forum: ASP .Net Building Controls
    Replies:
    4
    Views:
    173
    Kamaluokeakua
    Oct 2, 2004
Loading...

Share This Page