Results 1 to 3 of 3

Thread: Program Clock

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 1999
    Posts
    1

    Post

    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

  2. #2
    Hyperactive Member
    Join Date
    Jul 1999
    Location
    NY, USA
    Posts
    270

    Post

    Do you want the system clock to change its time or the program's clock to change its time?

  3. #3
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,176

    Post

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width