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 12345»»»

T-SQL Expand / Collapse
Author
Message
Posted Tuesday, December 14, 2010 8:47 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, August 27, 2014 1:05 PM
Points: 157, Visits: 292
Comments posted to this topic are about the item T-SQL
Post #1034869
Posted Tuesday, December 14, 2010 9:43 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Sunday, September 7, 2014 10:22 PM
Points: 1,126, Visits: 1,387
Good question with perfect link.

Thanks
Post #1034880
Posted Tuesday, December 14, 2010 10:11 PM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Yesterday @ 4:48 AM
Points: 1,891, Visits: 576
Good question

-----------------
Gobikannan
Post #1034882
Posted Tuesday, December 14, 2010 11:46 PM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Tuesday, September 23, 2014 2:25 AM
Points: 2,660, Visits: 4,733
I had run into this problem once after which I avoid 2 digit years. But now I know the reason for the issue. Thanks for the Question and the explanation.


Kingston Dhasian

How to post data/code on a forum to get the best help - Jeff Moden
http://www.sqlservercentral.com/articles/Best+Practices/61537/
Post #1034907
Posted Wednesday, December 15, 2010 12:20 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 2:22 AM
Points: 13,017, Visits: 10,798
Very good question! More of these please.



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1034921
Posted Wednesday, December 15, 2010 1:33 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 1:00 AM
Points: 2,541, Visits: 2,409
We recommend specifying four-digit years.

It's best to use the format 'yyyymmdd' because it's indipendent from "regional setting".
Post #1034941
Posted Wednesday, December 15, 2010 2:00 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 2:04 AM
Points: 5,380, Visits: 9,945
I got this right, but I think the question should have been qualified with something like "on an instance installed with the default settings". Otherwise the answer should be "it depends on the value of the two digit year cutoff setting in sp_configure".

John
Post #1034958
Posted Wednesday, December 15, 2010 2:05 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Monday, August 18, 2014 6:13 AM
Points: 984, Visits: 350
John Mitchell-245523 (12/15/2010)
I got this right, but I think the question should have been qualified with something like "on an instance installed with the default settings". Otherwise the answer should be "it depends on the value of the two digit year cutoff setting in sp_configure".
John


Since nothing was said about settings, we cant really assume anything other than "default". Of course, had there been a "depends" option, this should have been correct.

Good question.
Post #1034962
Posted Wednesday, December 15, 2010 2:19 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, September 17, 2014 1:05 AM
Points: 2,842, Visits: 3,875
Good Question, but not valid for all languages, since some have different date formats (ymd):
Japanese
Swedish
Hungarian
Croatian
Latvian
Lithuanian
Traditional Chinese
Korean
Simplified Chinese


SELECT dateformat, name, alias FROM sys.syslanguages WHERE dateformat NOT LIKE '%y'



Best Regards,
Chris Büttner
Post #1034969
Posted Wednesday, December 15, 2010 3:47 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, January 24, 2013 9:59 PM
Points: 1,354, Visits: 1,299
John Mitchell-245523 (12/15/2010)
I got this right, but I think the question should have been qualified with something like "on an instance installed with the default settings". Otherwise the answer should be "it depends on the value of the two digit year cutoff setting in sp_configure".

John

You beat me to it. When I was reading the question, I was thinking it's not possible to made a determination of the output without knowing the settings. I had to use the default settings and hope for the best and did get it right.

Also, to check the cutoff, I normally use SQL Server Management Studio, connect to the server, right click on the server name in the Object Explorer, then select Properties. A window pops up with several pages listed in the left-hand navigation bar. Select Advanced and you can see it defaults to 2049 as the cutoff. You can even change it from that window using the range 1753 to 9999.
Post #1035001
« Prev Topic | Next Topic »

Add to briefcase 12345»»»

Permissions Expand / Collapse