Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««56789

Fun(?) with DATETIME2 Expand / Collapse
Author
Message
Posted Thursday, August 11, 2011 9:38 AM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Yesterday @ 4:54 PM
Points: 8,689, Visits: 9,223
Revenant (8/10/2011)
I logged that October 5-14, 1582, unaccounted-for gap as a bug against Windows. (SQL Server gets the weekday via a WinAPI call.)

I was told that this will be “soon” corrected for the cultures (languages) that were on the Roman calendar at that time. Win guys are not exactly sure what to do about countries that converted later; most notably Russian Orthodoxy, which converted only after the October Revolution of 1917. (What do you do if the date and time are marked as GMT but the culture is one of the Eastern Orthodoxies? Any suggestions for precedence of calculation?) [/quote
They are going to have real fun for Italy, which at the time was a bunch of city-states some of which converted in 1582 and some of which didn't. Also with Germany and bits of Austria (Holy Roman Empire) which converted piece-meal at later dates. And with the GB locale (different year numbers in different countries), the Netherlands, France, and Denmark. Even in the USA Texas converted to dates back when it was still Spanish, much of the rest of the USA rather later, and the Louisana Territory switched at yet another time. I guess the best they can do (unless they have the sense to do nothing) will be to cobble together some arbitrary meaningless mess which will offend various cultures quite seriously, and pretend they've done something useful.

[quote]This goes all the way back to The Bard and his oft-quoted “time is out of joint,” which alluded to the fact that when he wrote Hamlet, the English calendar was out of sync with the Roman one.
It goes back a long way before that. Some states used 1Jan as official year beginning from more than 300 years before Shakespeare, but the Roman official year never began then.

I guess this means that someone will have to think through comparisons of dates on servers that are set to different cultures. (The mentioned October Revolution, which was logged on October 25, 1917, is now celebrated on November 7.)

Never a dull moment.
Indeed not!


Tom
Post #1158594
Posted Wednesday, September 28, 2011 7:57 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Wednesday, October 30, 2013 12:00 AM
Points: 535, Visits: 42
I am disagree with the correct answer of this query..
I got the following result after running the same in Msg window...

1752-09-09 00:00:00.0000000

I use "Microsoft SQL server 2008 R2", Please Explain....
Post #1182485
Posted Wednesday, September 28, 2011 8:12 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 10:48 AM
Points: 7,194, Visits: 6,338
hardikssit1 (9/28/2011)
I am disagree with the correct answer of this query..
I got the following result after running the same in Msg window...

1752-09-09 00:00:00.0000000

I use "Microsoft SQL server 2008 R2", Please Explain....


The explanation is in the answer to the question. This wasn't meant to be an uber-serious QOTD. It was meant as a fun little brain teaser. In certain calendars, the date doesn't technically exist. Which makes it even more interesting that MS says that it does.


Brandie Tarvin, MCITP Database Administrator

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.
Post #1182497
Posted Monday, February 27, 2012 8:44 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Wednesday, July 30, 2014 10:52 PM
Points: 483, Visits: 244
Great question on the DATETIME2 that supports larger precision times and date ranges.

Thanks.
Post #1258305
Posted Wednesday, June 11, 2014 8:17 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: 2 days ago @ 3:21 PM
Points: 2,501, Visits: 197
A bit tricky.
Post #1579645
« Prev Topic | Next Topic »

Add to briefcase «««56789

Permissions Expand / Collapse