• Thanks for the article. I appreciate it.

    One question though. It said in the article

    It’s important that the DATEDIFF in the formula have a "starting date" of "0" (the numeric equivalent of 1900-01-01) and an "ending date" of the duration calculation so that we don’t introduce any errors simply by crossing an "hour boundary" at the wrong time.

    which I expect means the DATEDIFF section should use

    DATEDIFF(hh,0,@EndDT-@StartDT)

    rather than

    DATEDIFF(hh,@StartDT,@EndDT)

    which also returns 26 in this example. I guess I don't understand what an "hour boundary" is or why we need to guard against crossing one. Could you give an example where these two DATEDIFF statements would give different results?