Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912

    Unanswered: Internal representation of DATETIME (SQL 2005)

    Anyone fancy explaining this, in particular the DATETIME? Why throttle a 4 byte int (internal storage of DATETIME) unnecessarily? I wanted a really high high date, not some piddly high one.
    Code:
    SELECT  CAST(CAST(0xFFFF        AS INT) AS SMALLDATETIME)
          , CAST(CAST(0x002D247F    AS INT) AS DATETIME)
    Love & hugs etc.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  2. #2
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,799
    Provided Answers: 11
    Is this about the well known Y10K problem in SQL 2005? Honestly, you should be able to upgrade your applications off of this version by no later than 9582 AD.

    I suspect you may be running into some sort of big-endian vs little endian representation, if you are asking why the leading two binary digits are 0's.

  3. #3
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    If this DATETIME limitation is a problem in one of your applications, I'd like to discuss that application in more detail.

    The design decision was made long before Microsoft started to market SQL Server. It seems perfectly reasonable to me, since in my mind there is little point in presenting a date in the form 00000000000002011-01-24T223122.000 instead of 2011-01-24T223122.000... That would be just Flumping ridiculous to me!

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  4. #4
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    You might not care to build future proofed applications but I anticipate my solutions will be used well past the 1000th century.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  5. #5
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,799
    Provided Answers: 11
    I can only imagine the generations of Flumps that will eventually become a sort of priest class ministering to the every need of these solutions. ;-)

  6. #6
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    My solutions should outlive the tools I use to write them... If I don't write the compiler, database engine, or other widget I carefully observe its limitations. Creating a Rube Goldberg to exceed the limitations of the tool is a nightmare which I've experienced first hand and have NO desire to foist upon some other competent sort that has to deal with it... They'll know how to deal with the limitations of the tool, they might or might not appreciate my dancing around those limitations!

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •