|
-
Jun 26th, 2000, 05:02 PM
#1
Thread Starter
Hyperactive Member
i got a value as for example 01:34:32 (hh:mm:ss). Wich is the best and easiest way to count down this to 00:00:00,
and then put my code. i want to display the time in a label.
-
Jun 26th, 2000, 05:30 PM
#2
Lively Member
countdown
just count up and use dateadd/datediff :
Dim x As Date
Dim y As Date
Private Sub command1_click()
x = Now()
Debug.Print TimeSerial(0, 0, DateDiff("s", y, x))
End Sub
Private Sub Form_Load()
y = DateAdd("h", 1, Now())
End Sub
-
Jun 26th, 2000, 05:34 PM
#3
Fanatic Member
Code:
Dim tTime As Date
Private Sub Form_Load()
Timer1.Interval = 1000
tTime = Now
End Sub
Private Sub Timer1_Timer()
tTime = DateAdd("s", -1, tTime)
Label1.Caption = Format(tTime, "hh:mm:ss")
End Sub
Iain, thats with an i by the way!
-
Jun 26th, 2000, 06:02 PM
#4
Thread Starter
Hyperactive Member
Thanks both!!!! It worked well. me.so glad.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|