Please refer this SQL Script
I have use DATEDIFF() function of SQL.
DECLARE @UserTable TABLE (ID INT ,DepID INT, [DateTime] DATETIME, [Status] BIT)
INSERT INTO @UserTable VALUES(1234, 46, '2014-11-11 08:42:53.470' , 0)
INSERT INTO @UserTable VALUES(1234, 47, '2014-11-11 08:42:53.470' , 1)
INSERT INTO @UserTable VALUES(1234, 47, '2014-11-12 08:09:40.683' , 0)
INSERT INTO @UserTable VALUES(1234, 51, '2014-11-12 08:09:40.730' , 1)
INSERT INTO @UserTable VALUES(1234, 51, '2014-11-14 08:05:55.400' , 0)
INSERT INTO @UserTable VALUES(1234, 58, '2014-11-14 08:05:55.447' , 1)
-- Min
SELECT DATEDIFF(MINUTE,(SELECT [DateTime] FROM @UserTable
WHERE [Status] = 1 AND DepId = 47),(SELECT [DateTime] FROM @UserTable
WHERE [Status] = 0 AND DepId = 47)) AS DiffDate
--Hours
SELECT DATEDIFF(HOUR,(SELECT [DateTime] FROM @UserTable
WHERE [Status] = 1 AND DepId = 47),(SELECT [DateTime] FROM @UserTable
WHERE [Status] = 0 AND DepId = 47)) AS DiffDate
--Days
SELECT DATEDIFF(DAY,(SELECT [DateTime] FROM @UserTable
WHERE [Status] = 1 AND DepId = 47),(SELECT [DateTime] FROM @UserTable
WHERE [Status] = 0 AND DepId = 47)) AS DiffDate