• The DATEDIFF function is your friend here

    😎

    SELECT

    isLocked

    ,LastLockoutDate

    ,currentDte

    ,DATEDIFF(MINUTE,LastLockoutDate,currentDte) AS DIFF_MINUTE

    FROM @tAccount

    Result

    isLocked LastLockoutDate currentDte DIFF_MINUTE

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

    1 2014-04-26 16:11:25.337 2014-04-26 18:57:15.777 166