# DATETIME - 3

• honza.mf (3/11/2013)

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.

I see what you mean... but as the default year starts with 1900 in the SQL I guess what wolfkillj meant might be has to do with this... from 1900 (100 years, including 1900) will be 1999, so 2000 (including 2000) for next century will 2000-2099.

(sorry to burst in between)

ww; Raghu
--
The first and the hardest SQL statement I have wrote- "select * from customers" - and I was happy and felt smart.

• Raghavendra Mudugal (3/11/2013)

honza.mf (3/11/2013)

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.

I see what you mean... but as the default year starts with 1900 in the SQL I guess what wolfkillj meant might be has to do with this... from 1900 (100 years, including 1900) will be 1999, so 2000 (including 2000) for next century will 2000-2099.

(sorry to burst in between)

Well, this makes my point even stronger - the word "century" is imprecise in the context of Microsoft's explanation of the cutoff year!

Jason Wolfkill

• The high standard I came to expect from Ron. Thanks!

• Came to the game late, have been off on a project and too busy to answer anything. Good question and learned something I had never looked into

Thanks

Not all gray hairs are Dinosaurs!

• Thanks for the question!

Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP

• Thanks for the Question. I figured it out by the fact that the questions were concentrating on 1949-1950.

I also use a version of DB2 which uses a Cutoff of 1940 i.e. 1940-01-01 to 2039-12-31 are the valid 2 digit year Dates.

• Interesting question.

• Interesting. Thanks

Viewing 8 posts - 31 through 38 (of 38 total)