Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Calculating world time shifts
I would like a formula to return GMT for places around the world. Obviously
some places will be in advance of GMT and some behind GMT. The difficulty I have found is in dealing with time that go either into the previous or following day. Any help please? Thanks. Bill Ridgeway |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Calculating world time shifts
How about:
Function gmt() As Date Application.Volatile dot = "." Set Serve = GetObject("winmgmts:\\" & dot & "\root\cimv2") Set Zones = Serve.ExecQuery("Select * From Win32_TimeZone") For Each Zone In Zones intTimeZoneBias = Zone.Bias intDayLightBias = Zone.DaylightBias Next gmt = Now() - (intTimeZoneBias - intDayLightBias) / (60 * 24) End Function I think from Pearson ? It should give true GMT whatever local time is. -- Gary''s Student - gsnu2007 "Bill Ridgeway" wrote: I would like a formula to return GMT for places around the world. Obviously some places will be in advance of GMT and some behind GMT. The difficulty I have found is in dealing with time that go either into the previous or following day. Any help please? Thanks. Bill Ridgeway |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Calculating world time shifts
"Bill Ridgeway" wrote in message
... I would like a formula to return GMT for places around the world. Obviously some places will be in advance of GMT and some behind GMT. The difficulty I have found is in dealing with time that go either into the previous or following day. Any help please? Thanks. Bill Ridgeway I think I've resolved this question. For anyone whose interested in the answer - Where - column B is local time column C is the + or - difference column D is the actual shift column E is the folrmula =IF(C3="-",B3+D3,IF(C3="+",B3+24-D3)) Regards. Bill Ridgeway |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Linked Budget Worksheets - What to do when Project Shifts in Time? | Excel Discussion (Misc queries) | |||
calculating timesheet, time-in/time-out = total hours & minutes, . | Excel Worksheet Functions | |||
Dividing a time span into shifts - overlapping days | Excel Worksheet Functions | |||
Calculating days & time left from start date/time to end date/time | Excel Worksheet Functions | |||
Calculating effective time from start/end date+time | Excel Worksheet Functions |