|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Friday, May 10, 2013 12:42 AM
Points: 316,
Visits: 143
|
|
gserdijn 2010-12-27 Hmm, undoubtedly this Q will come once again. But for a different country... like Holland. (Which should be The Netherlands by the way, but I digress)
This is also my addition to this question. I am living in Czech Republic (formerly Czech Lands) and there was Gregorian Calendar adopted 'several' years before - It was in 1584 ... days between 6th January and 17th January 1584 was 'canceled'.
__________________________________ Standing on the shoulders of giants ...
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Tuesday, May 07, 2013 3:28 AM
Points: 115,
Visits: 719
|
|
I agree with cdiebolt. While there was no such date in England's dating system at the time, it's a perfectly valid date in the Gregorian calendar, and corresponds to various dates in various countries' national systems.
So the function DOES do what I expected, hence it runs perfectly. "Perfect" is in the of the beholder, so not a word to be used in a specification - unless itself specified for the occasion. Please make the possible answers unambiguous in future - and scope the conditions precisely too.
I wonder if anyone has created a nation-sensitive historic date system in which Date('1752-09-02') + 1 would give the correct result depending on country. e.g. '1752-09-13' in England (and I think the rest of the UK), and '1752-09-03' in The Netherlands? It would be hard to do; you couldn't use ISO country codes to indicate locale, as some no longer exist and others (e.g. Belgium) were parts of multiple other countries at the time.
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Thursday, June 30, 2011 3:44 AM
Points: 971,
Visits: 62
|
|
I did not know about the 1752, though I should have. I totally expected it to work after going over the BOL entry on datetime2. It is the first time, that I do not mind getting an answer wrong, cause I learned something new & useful. Thx for the excellent question.
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Today @ 5:42 AM
Points: 3,189,
Visits: 4,146
|
|
I wonder how many records in one's database containing year 1752
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 7:52 AM
Points: 1,713,
Visits: 61
|
|
| I didn't expect it to fail so how can you say I did?
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 10:58 AM
Points: 6,655,
Visits: 5,678
|
|
Interesting. I didn't know the Gregorian calendar adoption for the British Empire was in 1752. All the history I studied talked about the Gregorian calendar being created in the 1500's, so I just assumed adoption was across the board in the same time frame.
Brandie Tarvin, MCITP Database Administrator, MCDBA, MCSA
Webpage: http://www.BrandieTarvin.net LiveJournal Blog: http://brandietarvin.livejournal.com/ On LinkedIn!, Google+, and Twitter.
Freelance Writer: Shadowrun Latchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Tuesday, May 07, 2013 3:28 AM
Points: 115,
Visits: 719
|
|
BTW Microsoft's documentation has an error too - it says "Accuracy 100 nanoseconds". This is of course the Resolution (or Precision) of the data.
The accuracy will depend on the original source of the time-stamp - which in my experience can vary from minutes (old server nobody cares about) to milliseconds (typical NTP setup). You'll only get 100 nSec accuracy in systems very tightly coupled to GPS (or a satellite-coordinated atomic clock). Even then, by the time some code has decided to date an event many many μSecs will have passed.
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Wednesday, January 09, 2013 1:27 PM
Points: 197,
Visits: 64
|
|
Fired up my local SQL 2008 Mgmt Studio, put the code into the query window (on Master), hit F5, and got: 1752-09-09 00:00:00.0000000
So, why do I now have an X on my test answer? I wasn't wrong, my SQL install isn't wrong... the world is.... :)
Oh well, Phil
|
|
|
|
|
SSCoach
         
Group: General Forum Members
Last Login: Yesterday @ 1:07 PM
Points: 18,733,
Visits: 12,332
|
|
|
|
|
|
Right there with Babe
      
Group: General Forum Members
Last Login: Yesterday @ 9:12 AM
Points: 738,
Visits: 1,125
|
|
I guessed Option:1.
SSMS QA says: 1752-09-09 00:00:00.0000000
Not sure, why the correct answer is :: Option No: 3
Thanks.
|
|
|
|