C
cyb3rwolf
Hello.
I have a form that has 3 fields:
Stime (Start time)
Etime (End time)
Ttime (Total Time)
So far i have buttons on my form for "Start" and "Complete." When you click
"Start," it puts in the current date and time in Stime. When you click
complete, it puts in the current date and time in Etime. Then, it also
figures out how many seconds (as an integer) has elapsed bewteen Stime and
Etime and puts that in the Ttime field. What i'm trying to do is have
another field in my form that takes the seconds from Ttime, converts it to
hh:mm:ss format to be put in another field in the form; including if the
duration is over 24 hours. Anybody help me out? My coding so far for the
"complete" click event procedure:
Private Sub Command36_Click()
Dim totalminutes As Long
Dim interval As Variant
'Dim duration As String
Me.Etime = Now()
interval = Me.Etime - Me.Stime
totalseconds = Int(CSng(interval * 86400))
Me.Ttime = totalseconds
End Sub
So, i would need to take Me.Ttime, convert it to hh:mm:ss and then put in in
a different text box on my form
I have a form that has 3 fields:
Stime (Start time)
Etime (End time)
Ttime (Total Time)
So far i have buttons on my form for "Start" and "Complete." When you click
"Start," it puts in the current date and time in Stime. When you click
complete, it puts in the current date and time in Etime. Then, it also
figures out how many seconds (as an integer) has elapsed bewteen Stime and
Etime and puts that in the Ttime field. What i'm trying to do is have
another field in my form that takes the seconds from Ttime, converts it to
hh:mm:ss format to be put in another field in the form; including if the
duration is over 24 hours. Anybody help me out? My coding so far for the
"complete" click event procedure:
Private Sub Command36_Click()
Dim totalminutes As Long
Dim interval As Variant
'Dim duration As String
Me.Etime = Now()
interval = Me.Etime - Me.Stime
totalseconds = Int(CSng(interval * 86400))
Me.Ttime = totalseconds
End Sub
So, i would need to take Me.Ttime, convert it to hh:mm:ss and then put in in
a different text box on my form