Writting a simple script to show time a user has been online, and the time they have been inactive for. Should produce something along the lines of:
Active for 7 mins
Inactive for 2 mins
But instead of this it produces:
Active for 7 mins
Inactive for 41760 mins
The code to update the last active field is:
strSQL = "UPDATE " & strDatabaseTablePre & "ActiveOperators SET lastActive = '" & now() & "' WHERE operatorID = " & lngOperatorID |
And the code to display the report is:
Response.write("<font color=""#008000""><B>Online</B></font>& lt;BR>Active for <B>" & dateDiff("n",rsCommon2("cameOnline"),rsCommon2("lastActive") ) & "</B> mins<BR>") Response.write("Inactive for <B>" & dateDiff("n",now(),rsCommon2("lastActive")) & "</b> mins") |
Example of a database record:
Lastactive: 11/12/2003 21:21:25
CameOnline: 11/12/2003 21:14:26
Any insight as to why its producing over 41,000 would be helpful! Thanks