• What I'm actually trying to get people to realize is that using JUST the time for this type of stuff (EndTime = StartTime + Duration) is the wrong thing to do unless it's ok to "wrap the clock" after midnight. If you have a duration that exceeds 24 hours starting just before midnight of one day, then you really need to show that the call or whatever duration your trying to portray ended two days later just after midnight.

    In other words, both StartTime and EndTime must show the date AND the time for both.

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