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

how to calculate between times (login & logout)

$
0
0
hey
i have a form with login in and log out options
now i added another field in the Database with the name Logtotal = (time in time out)
only when i log out and then log in i can see the log out time.
how do i calculate between those two field ?
after i log in ofcorse

this is the code that loads from the DB
Code:

Set RS = CN.Execute("SELECT * FROM Logs ORDER BY LogId")
    While Not RS.EOF
        Set Itm = FrmSecurityreport.LsVw.ListItems.Add(, , RS!LogId, , "report")
        Itm.Tag = RS!LogId
        Itm.bold = True
        Itm.SubItems(1) = RS!LogDate
        Itm.SubItems(2) = RS!LogDay
        Itm.SubItems(3) = RS!LogName
        Itm.SubItems(4) = RS!LogIn
     
  If Not IsNull(RS!logout) Then
Itm.SubItems(5) = RS!logout
End If
  If Not IsNull(RS!LogTotal) Then
Itm.SubItems(6) = RS!LogTotal
End If
   
       
       
     
        RS.MoveNext
        DoEvents
    Wend






tnx for the help

Viewing all articles
Browse latest Browse all 21376

Trending Articles



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