I am trying to calculate the total time a user has been logged on to an appilcation for the day. The beginnings of my query looks like this:
SELECT T.UserTimeLogIn,T.UserTimeLogOut, C.ContactFirstName, C.ContactLastName, T.ContactID
FROM T INNER JOIN C ON T.ContactID = C.ContactID
WHERE T.UserTimeLogIn >= @dtmStart AND T.UserTimeLogIn <= @dtmEnd
I want to display the user, date, and the total time the user was logged in that day. Everything I have tried falls short. Please help.
SELECT T.UserTimeLogIn,T.UserTimeLogOut, C.ContactFirstName, C.ContactLastName, T.ContactID
FROM T INNER JOIN C ON T.ContactID = C.ContactID
WHERE T.UserTimeLogIn >= @dtmStart AND T.UserTimeLogIn <= @dtmEnd
I want to display the user, date, and the total time the user was logged in that day. Everything I have tried falls short. Please help.