This will be from the time the user states. I have posted the full sample code I have been using below. For this I have just used Today (GETDATE()) as an example:SELECT a.AgentID, dbo.udf_TimeFormat(SUM(datediff(second,a.LogOnTime, ISNULL(a.LogOffTime, GETDATE())))) as [Total Login Time]FROM dbo.ActionSession aWHERE CONVERT(Varchar,a.LogOnTime, 112) BETWEEN CONVERT(Varchar,GETDATE(),112) and CONVERT(Varchar,GETDATE(),112)GROUP BY a.AgentID
The UDF is there just to make the times more readable.