+ Reply to Thread
Results 1 to 4 of 4

Change date time zone

Hybrid View

  1. #1
    Registered User
    Join Date
    11-28-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    3

    Change date time zone

    I am trying to put a running clock. In cell A1 successfully added running clock which is taking current system time, with the below VB code. However, I want a running clock for EST in B1, CST in C1 and MST in D1. Your healp much appreciated.

    Excell file attached... if someone can update in same and attach back, I will be very thankful.

    Current System Running clock:
    Global clockOn As Boolean
    Sub runClock()
    Range("A1").Value = Now()
    If clockOn = True Then
        Application.OnTime Now + TimeValue("00:00:01"), "runClock"
    End If
    End Sub
    Sub startClock()
        clockOn = True
        runClock
    End Sub
    Sub stopClock()
        clockOn = False
        
    End Sub
    Attached Files Attached Files
    Last edited by JBeaucaire; 11-28-2013 at 11:42 AM. Reason: Added CODE tags and moved to own thread. PLEASE stop and read the forum rules, link in menu bar above.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Change date time zone

    You don't need VBA for B1 and C1. Just use a formula to adjust the value currently displayed in A1:

    =A1-TIMEVALUE("1:00:00")

    Just add or subtract hours as needed.
    Last edited by JBeaucaire; 11-29-2013 at 01:43 AM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    11-28-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Change date time zone

    GREAT...

    Thank you so much JBeaucaire. You helped me a lot

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Change date time zone

    I've marked this thread as SOLVED for you.
    Next time, select Thread Tools from the links above to mark a thread as SOLVED. Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to do Date + Time Zone conversion in Excel??
    By mailtojsb in forum Excel General
    Replies: 9
    Last Post: 08-05-2016, 08:35 PM
  2. Why can I change my time zone but not my date format?
    By Kyle123 in forum Suggestions for Improvement
    Replies: 3
    Last Post: 10-26-2013, 03:06 PM
  3. [SOLVED] How to change time zone in Excel file?
    By littlebaggio in forum Excel General
    Replies: 10
    Last Post: 09-02-2013, 11:40 PM
  4. Date and time conversion to another time zone
    By RUBEN PARRAS in forum Excel General
    Replies: 1
    Last Post: 05-21-2012, 09:03 PM
  5. change date time zone
    By ijw in forum Excel General
    Replies: 4
    Last Post: 02-15-2009, 11:40 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1