• Hugo Kornelis (11/5/2010)


    Terrible question. The only correct answer is "it depends", and that answer was missing.

    If the default language of your server happens to be, for example, British English, you'll get 1 as your answer. Same for German, Dutch, French, and several other languages.

    Add this to the fact that it's impossible to know what date the number 40358 represents, and you get a question that is impossible to answer without running the code, and even after running it leaves you with a choice between two answers.

    (I used an educated guess - in my experience, over 90% of the code that does not cater for international use comes from the US, so I picked the answer I got when using SET LANGUAGE us_english)

    Please do submit more questions in the future - but not of this quality.

    Totally agree, except I suspect your 90% is an underestimate. I'm sure that if you look at developers who think it is better to have stuff which only works in one culture because it's less coding effort you will find that almost 99% are Americans. (Probably it's still a low proportion of Americans, but nothing like as low as it is in other countries.)

    Tom