How To Format Phone Number

  • cad.delworth (4/1/2016)


    The Dixie Flatline (4/17/2009)


    if you just stored phone numbers as integers, you would trim fat out of the row size as well.

    … and if you stored UK phone numbers as INTEGER, you'd need to prepend each one with '0' before delivering it to a UI object or similar to format it, because all UK phone numbers begin with a zero.

    This means that when you export and display phone numbers in a spreadsheet app such as Excel, you first have to format that column's cells as Text, or hilarity ensues when said app 'decides' that the column is numeric >sigh<. I daresay there are (?) many other countries where some/all phone numbers begin with zero.

    Having said that, us UK-ites do envy(-ish) the fact that all US phone numbers have ten digits AND use the identical 3-3-4 format for display. Over here, we (properly, anyway) use one of three different display formats (3-4-4, 4-3-4, 5-6) depending on the first four digits in the number.

    Oh, and just for extra s*its and giggles, a UK phone number can validly contain eleven or ten digits in it, again depending on the first few digits: which when formatted for display purposes, become a character string of either twelve or thirteen characters.

    What larks, eh?!! :crazy:

    Heh... I'm not surprised. About 15 years ago, I was participating on a solar forum and found out that many folks from the UK didn't know what a BTU (BRITISH Thermal Unit) was. 😛

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Jeff Moden (4/1/2016)


    [quote-0I was participating on a solar forum and found out that many folks from the UK didn't know what a BTU (BRITISH Thermal Unit) was. :-P[/quote-0]

    [FX: puffs on pipe]

    Actually, old chap, we tend to use all that Euro-johnny stuff (you know: Joules, Calories, etc.) as units for those amounts nowadays … aren't we ‘with it!’ — to use one of your Yankee terms …:-D

    I'm afraid that the BTU hasn't exactly been lingua franca here for some time, old man. I'm not at all surprised that even as recently as 2000, the young whippersnappers in your talking-shop wouldn't be au fait with the good old BTU.

    [FX: drinks tea, taps pipe bowl into ashtray to empty it …]

    … they tell me it's ‘progress …’ >sigh<

    😉

  • 😀 Can't beat that!

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 3 posts - 31 through 32 (of 32 total)

You must be logged in to reply to this topic. Login to reply