+ Reply to Thread
Results 1 to 4 of 4

Changing TimeZone format in Time Stamp

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

    Changing TimeZone format in Time Stamp

    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 Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Changing TimeZone format in Time Stamp

    Hi thr3e,

    See http://www.exceldigest.com/myblog/20...standard-time/
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

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

    Re: Changing TimeZone format in Time Stamp

    Thanks, that's really what I'm looking for.

    I need the code to just +2 hrs or -2 hrs from the current time When I use the Macro.

  4. #4
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Changing TimeZone format in Time Stamp

    Hi thr3e,

    I am not sure how you want to apply what where. One has to know what your objectives are with regards to target Cells etc. to Code accordingly. Do you want to click a button to up-date the time?

    See attached WorkBook as a starter.
    Attached Files Attached Files

+ 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