• The following shows the accuracy you're talking about...

    SELECT 1,CAST('2000-01-01 23:59:59.990' AS DATETIME) UNION ALL

    SELECT 2,CAST('2000-01-01 23:59:59.991' AS DATETIME) UNION ALL

    SELECT 3,CAST('2000-01-01 23:59:59.992' AS DATETIME) UNION ALL

    SELECT 4,CAST('2000-01-01 23:59:59.993' AS DATETIME) UNION ALL

    SELECT 5,CAST('2000-01-01 23:59:59.994' AS DATETIME) UNION ALL

    SELECT 6,CAST('2000-01-01 23:59:59.995' AS DATETIME) UNION ALL

    SELECT 7,CAST('2000-01-01 23:59:59.996' AS DATETIME) UNION ALL

    SELECT 8,CAST('2000-01-01 23:59:59.997' AS DATETIME) UNION ALL

    SELECT 9,CAST('2000-01-01 23:59:59.998' AS DATETIME) UNION ALL

    SELECT 10,CAST('2000-01-01 23:59:59.999' AS DATETIME)

    Results:

    ----------- ------------------------------------------------------

    1 2000-01-01 23:59:59.990

    2 2000-01-01 23:59:59.990

    3 2000-01-01 23:59:59.993

    4 2000-01-01 23:59:59.993

    5 2000-01-01 23:59:59.993

    6 2000-01-01 23:59:59.997

    7 2000-01-01 23:59:59.997

    8 2000-01-01 23:59:59.997

    9 2000-01-01 23:59:59.997

    10 2000-01-02 00:00:00.000

    (10 row(s) affected)

    --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)