• Eirikur Eiriksson (8/2/2014)


    The datetime format is still the same upto and including 2014.

    😎

    Thanks Eirikur. I've never looked at it but figured it might be so. That does, however, make my disappointment in the DATETIME2 data type even deeper. Except for the precision byte, it's virtually identical to DATETIME... why would they cripple the data type by making direct addition and subtraction impossible?

    What adds to the disappointment is that the DATETIME2 data type, even when scaled back to DATETIME2(3) to produce the same number of digits (but, not the same accuracy) as DATETIME is 49% slower than when the same code is used for DATETIME. Yeah, it takes millions of rows for that to really add up but I have millions of rows that I work with.

    The DATETIME2 solution that requires DATEPART is also 72% slower than DATETIME with the decimal conversion.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)