I assume you are doing something along the lines of Session(“LoginTime”) =
Now then the user logs in. When they log out you could do something along the
lines of:
Dim dt As DateTime = CType(Session("LoginTime"), DateTime)
Dim ts As TimeSpan = Now.Subtract(dt)
This would give you what you are looking for, I think. Have a look at the
help on TimeSpan.
Hope it helps.
Chris.
"ACaunter" wrote:
Hi all,
I needed to know if there was a way to count the hours a user has been
logged on for. When they first log in, i record the time and when the
logoff i record the time, but now how would i subtract them.. specially if
they log on at 2300hr and log off at 1am in the morning..
thanks
--
Ad****@hotmail.com