+ Reply to Thread
Results 1 to 4 of 4

Changing the TimeZone, when inserting time

Hybrid View

  1. #1
    Registered User
    Join Date
    03-19-2012
    Location
    D.C.
    MS-Off Ver
    Excel 2007
    Posts
    4

    Changing the TimeZone, when inserting time

    So I created a little timestamp Macro and assigned a shortcut to help me when documenting on the fly

    Sub TimeStamp()
    'Inserts current date
    Selection.InsertDateTime DateTimeFormat:="hh:mm AM/PM ", InsertAsField:=False
    lbl_Exit:
    Exit Sub
    End Sub
    My PC is set to Eastern Time zone, but I would like the time that's generated by the macro to be Mountain Time.
    How would I change the code to do so?

    (I know it would a lot easier if I just change the time zone setting on the PC itself, but I'm in a environment that doesn't allow that, and I have no pc admin previllages.)

  2. #2
    Forum Contributor darknation144's Avatar
    Join Date
    01-24-2012
    Location
    London
    MS-Off Ver
    Microsoft Excel 365 MSO
    Posts
    555

    Re: Changing the TimeZone, when inserting time

    If you are only using one time zone can you not just add +2 (or what ever the time difference is) to your formula when it inserts the time?

  3. #3
    Registered User
    Join Date
    03-19-2012
    Location
    D.C.
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Changing the TimeZone, when inserting time

    Quote Originally Posted by darknation144 View Post
    If you are only using one time zone can you not just add +2 (or what ever the time difference is) to your formula when it inserts the time?
    Exactly what I'm looking for, but how would I achieve this?

    Do you know the code?

    Thanks

  4. #4
    Forum Contributor darknation144's Avatar
    Join Date
    01-24-2012
    Location
    London
    MS-Off Ver
    Microsoft Excel 365 MSO
    Posts
    555

    Re: Changing the TimeZone, when inserting time

    I can't get your module to work.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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