Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21273

how to calculate time in and out when i log off the system

$
0
0
is there a way to calculate the time in and time out
to show in the table LogTotal = LogIn + LogOut

this is the code :
when i log in the system
Code:

ULog = NextID("LogID", "Logs")
CN.Execute "INSERT INTO Logs (LogID, LogDate, LogDay, LogName, LogIn) VALUES (" & _
ULog & ", #" & Format(Now, "mm/dd/yyyy") & "#,'" & Format(Date, "dddd") & "','" & UsLogin & " ', #" & _
Format(Now, "HH:MM:SS") & "#)"

when i log out
Code:

CN.Execute "UPDATE Logs SET LogOUT= #" & Format(Now, "HH:MM:SS") & "# WHERE LogID= " & ULog
the tables are
Code:

LogID
LogDate
LogDay
LogName
LogIn
LogOut
LogTotal

any help will be appreciated
regards salsa31

Viewing all articles
Browse latest Browse all 21273

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>