LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default System time to GMT

Caleb,

If you know your offset from GMT, use either

=A1+TIME(H,0,0)
or
=A1-TIME(H,0,0)

where A1 is the time and H is the absolute value of the offset in hours from
local time to GMT. Use the addition version of the formula if your local
time is earlier than GMT (you are in western longitude) or use the
subtraction formula if GMT is earlier than your local time (you are in
eastern longitude).

For an in depth discussion of GMT and Excel, including example formulas and
VBA code, see http://www.cpearson.com/excel/LocalAndGMTTimes.htm . Also see
http://www.cpearson.com/excel/FileTimes.htm for a discussion of the times
used by FILETIME, SYSTEMTIME and local times and conversion between them.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting
www.cpearson.com
(email on the web site)






"Caleb Runnels" wrote in message
...
I'm trying to figure out a way to convert the system time to GMT for use
in a userform. Any suggestions would be greatly appreciated.


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy System Time Dave VB logic for excel Excel Discussion (Misc queries) 3 July 26th 07 03:31 PM
The 1904 Time System embirath[_3_] Excel Programming 11 August 19th 06 04:23 PM
system time and date kdp145[_5_] Excel Programming 0 March 21st 06 04:03 PM
what if system time is changed? JNW Excel Programming 2 October 27th 05 01:16 AM
Inserting the system time Dazza Excel Programming 2 May 18th 04 05:00 AM


All times are GMT +1. The time now is 10:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"