Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


DATETIME - 3


DATETIME - 3

Author
Message
Dave62
Dave62
Hall of Fame
Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)

Group: General Forum Members
Points: 3050 Visits: 2714
Thanks for a great question Ron.

I'm thinking about including a question like this in an interviewing process. Based on the current responses I think it could be very effective in separating those who know the subject from those who don't and also quite effective in separating those who are better at deduction and problem solving from those who are not so strong in that area.

QotD's like this may be a great resource for putting together a quick and effective screening process! ;-)
(Bob Brown)
(Bob Brown)
SSC Eights!
SSC Eights! (815 reputation)SSC Eights! (815 reputation)SSC Eights! (815 reputation)SSC Eights! (815 reputation)SSC Eights! (815 reputation)SSC Eights! (815 reputation)SSC Eights! (815 reputation)SSC Eights! (815 reputation)

Group: General Forum Members
Points: 815 Visits: 1145
Dave62 (3/11/2013)
Thanks for a great question Ron.

I'm thinking about including a question like this in an interviewing process. Based on the current responses I think it could be very effective in separating those who know the subject from those who don't and also quite effective in separating those who are better at deduction and problem solving from those who are not so strong in that area.

QotD's like this may be a great resource for putting together a quick and effective screening process! ;-)


I would hope most places and SQL server users don't use two-digit years. I know I had to look up this rule (didn't know it) because we only use 4 digit year everywhere. Seems like that should be a no brainer since the Y2K fiasco.
Ken Wymore
Ken Wymore
SSCarpal Tunnel
SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)

Group: General Forum Members
Points: 4419 Visits: 2342
I thought everyone I work with only used 4 digit years until last week. I saw some code where they were using test values for date parameters with 2 digit years. It was a fairly new report query too so I can't chalk it up to someone being young and not knowing better. Luckily we don't deal with future dates beyond about a year from the current date. Still good to know the cutoff so that if an issue does arise, I'll know where to look first.
Hugo Kornelis
Hugo Kornelis
SSCrazy Eights
SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)

Group: General Forum Members
Points: 8321 Visits: 11552
Dave62 (3/11/2013)
I'm thinking about including a question like this in an interviewing process.

I don't agree. I happened to know this one because I was already using SQL Server at the end of the previous century (wow, putting it like that really makes me feel old!) But how many people who started using SQL Server more recently would know this? I would be perfectly fine with employees who frankly admit that they'd have to look up (or experiment) to predict what SQL does with a two-digit year. And if I found someone who did know this, I'd still want to know if (s)he has been keeping up to date, or is still on knowledge of SQL 7.0 and SQL 2000 only.

QotD's like this may be a great resource for putting together a quick and effective screening process! ;-)

Some QotD's could be used in an interview, but the large majority are more trivia-type questions and less about knowledge required for real-world SQL Server jobs.


Hugo Kornelis, SQL Server MVP
Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
mtassin
mtassin
SSCarpal Tunnel
SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)

Group: General Forum Members
Points: 4101 Visits: 72512
Thanks for the question... brought back memories of the Y2K "feature"



--Mark Tassin
MCITP - SQL Server DBA
Proud member of the Anti-RBAR alliance.
For help with Performance click this link
For tips on how to post your problems
Dave62
Dave62
Hall of Fame
Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)

Group: General Forum Members
Points: 3050 Visits: 2714
Hugo Kornelis (3/11/2013)
Dave62 (3/11/2013)
I'm thinking about including a question like this in an interviewing process.

I don't agree. I happened to know this one because I was already using SQL Server at the end of the previous century (wow, putting it like that really makes me feel old!) But how many people who started using SQL Server more recently would know this? I would be perfectly fine with employees who frankly admit that they'd have to look up (or experiment) to predict what SQL does with a two-digit year. And if I found someone who did know this, I'd still want to know if (s)he has been keeping up to date, or is still on knowledge of SQL 7.0 and SQL 2000 only.

QotD's like this may be a great resource for putting together a quick and effective screening process! ;-)

Some QotD's could be used in an interview, but the large majority are more trivia-type questions and less about knowledge required for real-world SQL Server jobs.


Great point Hugo.

There still may be some value in using QotD's like this one as interview questions because of the revelations about deductive reasoning and problem solving.

I'm referring to the fact that there was only 1 option for Value 4 and still some failed to choose it. Hehe
sestell1
sestell1
SSCrazy
SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)

Group: General Forum Members
Points: 2192 Visits: 3415
Hugo Kornelis (3/11/2013)
Dave62 (3/11/2013)
I'm thinking about including a question like this in an interviewing process.

I don't agree. I happened to know this one because I was already using SQL Server at the end of the previous century (wow, putting it like that really makes me feel old!) But how many people who started using SQL Server more recently would know this? I would be perfectly fine with employees who frankly admit that they'd have to look up (or experiment) to predict what SQL does with a two-digit year. And if I found someone who did know this, I'd still want to know if (s)he has been keeping up to date, or is still on knowledge of SQL 7.0 and SQL 2000 only.


I probably wouldn't use this exact question as I see no point in memorizing details you can look up, but I could see an interview question that tests to see if the candidate is at least aware of such issues when working with a two digit year.
honza.mf
honza.mf
SSCommitted
SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)

Group: General Forum Members
Points: 1771 Visits: 1323
Hugo Kornelis (3/11/2013)
Dave62 (3/11/2013)
I'm thinking about including a question like this in an interviewing process.

I don't agree. I happened to know this one because I was already using SQL Server at the end of the previous century (wow, putting it like that really makes me feel old!) But how many people who started using SQL Server more recently would know this? I would be perfectly fine with employees who frankly admit that they'd have to look up (or experiment) to predict what SQL does with a two-digit year. And if I found someone who did know this, I'd still want to know if (s)he has been keeping up to date, or is still on knowledge of SQL 7.0 and SQL 2000 only.


Maybe if response "I'm not sure how MSSQL treats two-digit years but I can look BOL" is OK.
You are right, this behaviour is from a museum.



See, understand, learn, try, use efficient
© Dr.Plch
wolfkillj
wolfkillj
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1104 Visits: 2582
demonfox (3/11/2013)
kapil_kk (3/11/2013)
Hi,

can someone plz explain it in a more simple manner..... explanation in QOTD is very inscrutable for meCool


Inscrutable , is that the right word Ermm

well, as explained in the explanation ..

1.
The two digit year cutoff option specifies an integer from 1753 to 9999 that represents the cutoff year for interpreting two-digit years as four-digit years.


So, for sql server to interpret Two digit year as Four digit year
2.
The default time span for SQL Server is 1950-2049,



It means , if you anything in between the above range .. it will interpret as current century ..

50 is 1950
51 is 1951
49 is 2049
48 is 2048

is that clear enough ??? :-)


I think Microsoft made its explanation of how the cutoff year functions more confusing by using the word "century". In my mind, and I suspect many others think the same way since this seems to be the most common usage, the word "century" denotes a 100-year period beginning on a year evenly divisible by 100, e.g. 1900 - 1999, 2000 - 2099. Thus, I might have decided that a two-digit year value of 65, being in the same "century" as the default cutoff year of 2049 (i.e., 2000-2099) would mean 2065.

Microsoft could have made the explanation clearer by specifying that "a two-digit year value is interpreted as being within the 100-year period ending with the cutoff year." That would make it crystal clear to me that a cutoff year of 2049 means that two-digit year values will be deemed to represent years 1950 - 2049 while a cutoff year of 2074 would mean that two-digit year values will be deemed to represent years 1975 - 2074, etc.

Jason Wolfkill
Blog: SQLSouth
Twitter: @SQLSouth
honza.mf
honza.mf
SSCommitted
SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)

Group: General Forum Members
Points: 1771 Visits: 1323
wolfkillj (3/11/2013)

I think Microsoft made its explanation of how the cutoff year functions more confusing by using the word "century". In my mind, and I suspect many others think the same way since this seems to be the most common usage, the word "century" denotes a 100-year period beginning on a year evenly divisible by 100, e.g. 1900 - 1999, 2000 - 2099. Thus, I might have decided that a two-digit year value of 65, being in the same "century" as the default cutoff year of 2049 (i.e., 2000-2099) would mean 2065.

Microsoft could have made the explanation clearer by specifying that "a two-digit year value is interpreted as being within the 100-year period ending with the cutoff year." That would make it crystal clear to me that a cutoff year of 2049 means that two-digit year values will be deemed to represent years 1950 - 2049 while a cutoff year of 2074 would mean that two-digit year values will be deemed to represent years 1975 - 2074, etc.

Are you sure a century is 1900-1999? I think a century is 1901-2000.



See, understand, learn, try, use efficient
© Dr.Plch
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search