(See my notes above first, please.)
For the data that you would have, however, by pairing consecutive login/logout pairs, you could process the data to get the information that you need just using a simple dateDiff([datepart], [date 1], [date 2]) function in CF to figure out the difference, if you had already queried the data.
For the data handling, I would suggest adding another row to your table -- one that handles a Session ID. This will ensure proper pairing of your login/logout times. You then could set up your queries something like the following:
<cfquery name="getSession" datasource="[dsn]">
SELECT DISTINCT sessionID
FROM logTable
WHERE userID = <cfqueryparam cfsqltype="cf_sql_integer" value="[inputted userID]" />
</cfquery>
...then, to get the individual login sessions' login times, run a loop like this to output them...
<cfoutput query="getSessions">
<cfquery name="getSessionInfo" datasource="[dsn]">
SELECT
(SELECT time
FROM logTable
WHERE sessionID = <cfqueryparam cfsqltype="cf_sql_varchar" value="#getSessions.sessionID# />
AND logType = <cfqueryparam cfsqltype="cf_sql_varchar" value="login" />)
AS loginTime,
(SELECT time
FROM logTable
WHERE sessionID = <cfqueryparam cfsqltype="cf_sql_varchar" value="#getSessions.sessionID# />
AND logType = <cfqueryparam cfsqltype="cf_sql_varchar" value="logout" />)
AS logoutTime
FROM logTable
</cfquery>
[ancillary output - use your DateDiff here with getSessionInfo.loginTime and getSessionInfo.logoutTime as your two date/times and use the data as you need]
</cfoutput>
My SQL on this may be a little off, but at least it points you in the right direction... Hope this helps... feel free to contact me off-list for more explanation.