Home Forums SQL Server 2008 T-SQL (SS2K8) Formatting date of birth using South African ID number RE: Formatting date of birth using South African ID number

  • GilaMonster (11/9/2012)


    Jason-299789 (11/9/2012)


    You have some serious problems and the person responsible for dropping the century part of the date should be taken down a dark ally. (I've been reading too many of Celkos posts, :-D)

    Blame the South African government many decades ago.

    The format for the South African ID number starts with YYMMDD (date of birth of the ID number holder) and no amount of yelling at the person trying to write some code is going to change the format of the ID number that's used on all official documentation across an entire country.

    The ID number is a CHAR(13). YYMMDDGGGGCCC (the numbers G flag the gender, the last 3 contain info on citizenship)

    I didnt know that it was a government standard, but you would have thought they would have bit the bullet and updated thier IT systems 15-20 years ago when the Y2K bug was in full swing. Its not as if its unprecedented in terms of issuing new numbers to people.

    _________________________________________________________________________
    SSC Guide to Posting and Best Practices