PDA

Click to See Complete Forum and Search --> : Program Clock


N242NY
Oct 31st, 1999, 01:48 AM
I am making a clock program. which will be used as a world time
clock it will start at GMT timezone and go from there. I am
wondering how to make this clock change its time, like add or
remove a hour or two. i am using a simple code using a label and
a timer.

Private Sub Timer1_Timer()
Label2.Caption = Time
Label3.Caption = Date
Form1.Caption = Time

End Sub

with the timer interval set at 1000

you can email me @ RD242NY@excite.com

Compwiz
Oct 31st, 1999, 09:04 AM
Do you want the system clock to change its time or the program's clock to change its time?

Aaron Young
Oct 31st, 1999, 10:24 PM
Use the DateAdd() Function, eg.

Label3 = Format(DateAdd("h", 2, Now), "HH:MM:SS") 'Add 2 Hours to Current Time

------------------
Aaron Young
Analyst Programmer
aarony@redwingsoftware.com
adyoung@win.bright.net