T-SQL

  • OCTom (12/15/2010)


    The Y2K rush was exciting, boring, tedious, scary...

    This question does make one wonder why 2-digit years are still in use. However, since SQL Server dates only go out to 12-31-9999, we should get ready for y10k soon. 😉

    Thanks for bringing back the memories.

    Not necessary. According to some people, the Mayan calendar shows the world will end on December 21, 2012 anyway.

    http://en.wikipedia.org/wiki/2012_phenomenon

  • the Mayan calendar shows the world will end on December 21, 2012 anyway.

    Mayan calendar BUG: 12/12/2012 is the end.

    :-D:-D:-D

  • Carlo Romagnano (12/16/2010)


    the Mayan calendar shows the world will end on December 21, 2012 anyway.

    Mayan calendar BUG: 12/12/2012 is the end.

    :-D:-D:-D

    Actually, it's 12/21/2012

  • cengland0 (12/16/2010)


    Carlo Romagnano (12/16/2010)


    the Mayan calendar shows the world will end on December 21, 2012 anyway.

    Mayan calendar BUG: 12/12/2012 is the end.

    :-D:-D:-D

    Actually, it's 12/21/2012

    It depends on "Regional Settings".

    :-D:-D:-D:-D

  • Carlo Romagnano (12/16/2010)


    cengland0 (12/16/2010)


    Carlo Romagnano (12/16/2010)


    the Mayan calendar shows the world will end on December 21, 2012 anyway.

    Mayan calendar BUG: 12/12/2012 is the end.

    :-D:-D:-D

    Actually, it's 12/21/2012

    It depends on "Regional Settings".

    :-D:-D:-D:-D

    I hope you're kidding because I know of settings that can change from mm/dd/yyyy to dd/mm/yyyy or yyyy/mm/dd but none that will change a 21 to a 12.

  • cengland0 (12/16/2010)


    Carlo Romagnano (12/16/2010)


    cengland0 (12/16/2010)


    Carlo Romagnano (12/16/2010)


    the Mayan calendar shows the world will end on December 21, 2012 anyway.

    Mayan calendar BUG: 12/12/2012 is the end.

    :-D:-D:-D

    Actually, it's 12/21/2012

    It depends on "Regional Settings".

    :-D:-D:-D:-D

    I hope you're kidding because I know of settings that can change from mm/dd/yyyy to dd/mm/yyyy or yyyy/mm/dd but none that will change a 21 to a 12.

    There could be a super-secret release that offers the expression of a day number in base nineteen.;-):hehe::-D:-)

  • john.arnott (12/16/2010)


    There could be a super-secret release that offers the expression of a day number in base nineteen.;-):hehe::-D:-)

    I did some research on the Mayan calendar and it seems they used a base 20 numbering system. Very interesting. Also, They had two calendars. One was 260 days long (13 * 20) and the other was 360 (18 * 20) plus 5 bad luck days at the end of the year. That gave them 365 days total for each year. Unfortunately they didn't account for the extra quarter day (.256) each year (leap years) so after a couple centuries, their calendars would have been all messed up and no longer tied to the seasons properly.

    I'm still curious what the 260 day calendar was for. There are some good theories and the best one is for the pregnancy cycles. It is 260 days from the first missed period to the birth of the child. We currently use a 280 day cycle (40 weeks) but that is from the date of the last period instead of the missed period.

    Now, they discovered another Mayan calendar that uses 819 days. I cannot find any reason for this number of days. I thought it could be other planet orbits but Mars takes 686.95 days and Jupiter 4337. The 819 falls in between. Anyone else have any clue what they would count 819 days for?

  • cengland0 (12/16/2010)


    john.arnott (12/16/2010)


    There could be a super-secret release that offers the expression of a day number in base nineteen.;-):hehe::-D:-)

    I did some research on the Mayan calendar and it seems they used a base 20 numbering system. Very interesting. Also, They had two calendars. One was 260 days long (13 * 20) and the other was 360 (18 * 20) plus 5 bad luck days at the end of the year. That gave them 365 days total for each year. Unfortunately they didn't account for the extra quarter day (.256) each year (leap years) so after a couple centuries, their calendars would have been all messed up and no longer tied to the seasons properly.

    I'm still curious what the 260 day calendar was for. There are some good theories and the best one is for the pregnancy cycles. It is 260 days from the first missed period to the birth of the child. We currently use a 280 day cycle (40 weeks) but that is from the date of the last period instead of the missed period.

    Now, they discovered another Mayan calendar that uses 819 days. I cannot find any reason for this number of days. I thought it could be other planet orbits but Mars takes 686.95 days and Jupiter 4337. The 819 falls in between. Anyone else have any clue what they would count 819 days for?

    Several speculations are that 819 = 7 * 9 * 13. There 13 Gods of the heavens, 9 of the underworld and 7 of the earth.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • nice clear unambiguous question. Thanks.

    Tom

  • There could be a super-secret release that offers the expression of a day number in base nineteen.;-):hehe::-D:-)

    The date 21 december 2012 depends on the fact that mayan DBA are still using Slqserver sybase 1.0 and the datetime is limited to 21 december 2012.

    We are using sqlserver 2008 R2 and datetime limit is 31 december 9999 (next real end of world).

  • Nice question, didn't have any idea about cut off year.

  • I was kind off expecting SQL to throw an error due to regional settings. I am in South Africa and we specify the day before the month (the day is after all smaller than the month).

    Are there any regional settings when this won't work?

    It did throw a fault when I ran:

    SELECT CAST('22/02/00' AS DATETIME)

    which would be 'dd/mm/yy'.

    Good question but SQL would throw an error it wasn't 02 February all the time.

Viewing 12 posts - 31 through 41 (of 41 total)

You must be logged in to reply to this topic. Login to reply