• Thx for sharing the code,,

    I am getting the below error

    Msg 535, Level 16, State 0, Line 10

    Difference of two datetime columns caused overflow at runtime.