+ Reply to Thread
Results 1 to 4 of 4

Using VBA to get system time in GMT equivalent instead of local time

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    10-17-2008
    Location
    Vancouver
    MS-Off Ver
    2002 and XP
    Posts
    117

    Using VBA to get system time in GMT equivalent instead of local time

    Hello,
    I am wondering if there is a simple way to get the GMT equivalent in vba code. I am being a date/timestamp but realized that timezone differences may complicate matters, therefore I would like to "standardize" the timestamps into their GMT equivalent rather then using the computer's local time

    I had been using
    textbox1.text = Now
    and am wondering if there is a simple alteration to this that would acheive what I want it to

    thanks in advance
    Last edited by kuraitori; 03-03-2009 at 06:12 PM.

  2. #2
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: Using VBA to get system time in GMT equivalent instead of local time

    kuraitori,

    I am not sure, but this may help.
    Timezone Calculating Formula
    http://www.mrexcel.com/forum/showthread.php?t=300163


    Or, you could search on Google for "Timezone Calculating Formula".


    Have a great day,
    Stan
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Using VBA to get system time in GMT equivalent instead of local time

    Chip Pearson has a whole page on this & related subjects. Thre's a downloadable workbook.

    Using the functions in the workbook this will retun GMT time
    Sub getGMT()
    MsgBox Now + GMTBias()
    End Sub
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Forum Contributor
    Join Date
    10-17-2008
    Location
    Vancouver
    MS-Off Ver
    2002 and XP
    Posts
    117

    Re: Using VBA to get system time in GMT equivalent instead of local time

    Thank you, I was able to simplify that in a gmt equivalent

+ 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