Hi Andrew,
You want to know the duration in hours of the user between the time he logs in and logs out, is that it?
To calculate the number of hours between two date times, you can use the OutSystems built-in function DiffHours, example below:

Regarding the login date time and logout date time, the first one is saved and handled automatically on the platform, on the attribute Last_Login from the table User (from System):

Nonetheless, the logout date time is not saved by default, so you would have to have to create a table to store this information. You could create for instance a table User_Extended with the UserId and LastLogoutDate to be filled when the user presses logout. After having the logout and login, you can easily get the hours difference using the DiffHours function mentioned above.
Hope it helps.
Regards,
João