Excel time calculations


  1. Posts : 8,642
    Windows 10 Home
       #1

    Excel time calculations


    I've searched here and the internet and followed examples but still get stuck on this problem.

    I've a spreadsheet column of hhmm local cities and times that I want to populate an adjacent cell with UTC hhmm. For example, Melbourne (Aust.) 0900 is (currently) 2300 UTC, 10 hrs difference. I've tried using 10/24ths or the TIME(10,0,0) or MOD function added/subtracted to 0900 but never get 2300. Arghhh. Maybe my cell format is wrong but I've tried all sorts including custom.

    Help appreciated. Not an important problem but silently driving me mad
      My Computer


  2. Posts : 17,661
    Windows 10 Pro
       #2

    Time zones can be confusing. The formula is simple and gives correct result, when you remember that UTC is 10 hours BEHIND Melbourne time, in other words the difference is -10 hours. When it's 09:00 in the morning in Melbourne, it's 23:00 the evening before in UTC.

    The formula is:

    =MOD(B1 + (D1 / 24),1)

    … where B1 is time in source time zone, and D1 is time difference between source zone and target zone.

    Excel time calculations-image.png

    Yes, Melbourne time zone is UTC +10, but if you want to calculate what that is in UTC, you need to take away 10 hours.

    Kari
      My Computer


  3. Posts : 8,642
    Windows 10 Home
    Thread Starter
       #3

    Excel time calculations


    Thanks Kari, I'll give that a go. I think I knew what I wanted but put myself in the wrong location to enter -10 [emoji5] (I'm UK)

    As my column of local times may be east or west of Greenwich, I assume I need to be implicitly positive or negative in column D for each row?
      My Computer


  4. Posts : 17,661
    Windows 10 Pro
       #4

    Doc943 said:
    As my column of local times may be east or west of Greenwich, I assume I need to be implicitly positive or negative in column D for each row?
    Yes. You need to think if the compared time zone is ahead or behind yours.

    The formula is simple, and the sample formula in my last post works. The thing is, you need to think which way you want to do the time zone conversion.

    A real life example: I am in time zone UTC +2 now because of the summer time. On a certain website, I work together with someone who lives in Texas, USA. Current summer time (daylight saving as they say in US) time zone for him is UTC -5.

    If I want to compare local times for us both, I need to remember that he is 7 hours behind me, and that I am 7 hours ahead of him, and change formula in Excel accordingly. So, the D1 cell in my previous post would be -7 if I compared my time to his, or 7 if I compared his time to mine.

    In your case, I think you have done everything correctly but that you have just forgotten that if you want to compare Melbourne time to UTC, it's minus, even if the official time zone there is plus, UTC +10.

    This, knowing when you have to use a minus sign even when time zone has a plus sign is important. Always think if source time zone is ahead or behind the time zone you are comparing with.

    Reading what I wrote, it really looks complicated . I really hope you can get my point.

    Kari
      My Computer


  5. Posts : 11,247
    Windows / Linux : Arch Linux
       #5

    Kari said:
    Yes. You need to think if the compared time zone is ahead or behind yours.

    The formula is simple, and the sample formula in my last post works. The thing is, you need to think which way you want to do the time zone conversion.

    A real life example: I am in time zone UTC +2 now because of the summer time. On a certain website, I work together with someone who lives in Texas, USA. Current summer time (daylight saving as they say in US) time zone for him is UTC -5.

    If I want to compare local times for us both, I need to remember that he is 7 hours behind me, and that I am 7 hours ahead of him, and change formula in Excel accordingly. So, the D1 cell in my previous post would be -7 if I compared my time to his, or 7 if I compared his time to mine.

    In your case, I think you have done everything correctly but that you have just forgotten that if you want to compare Melbourne time to UTC, it's minus, even if the official time zone there is plus, UTC +10.

    This, knowing when you have to use a minus sign even when time zone has a plus sign is important. Always think if source time zone is ahead or behind the time zone you are comparing with.

    Reading what I wrote, it really looks complicated . I really hope you can get my point.

    Kari

    What's this

    another "Yankee" takeover

    UTC is actually GMT (Greenwich Mean Time) (longitude 0 through Greenwich S.E London)

    As for Longitude -- how it was calculated etc - great story at to how it was done -- from Harrison in Lincolnshire, England in 1800's.

    If you can see the TV series Longitude great informative play based on the actual events.

    https://en.wikipedia.org/wiki/Longitude_(TV_series)

    Do Americans always have this "Not invented Here" phobia so they have to call it something else instead.

    I suppose that's why they have that Wonky date system too !!!!!

    Cheers
    jimbo
      My Computer


  6. Posts : 17,661
    Windows 10 Pro
       #6

    jimbo45 said:
    What's this

    another "Yankee" takeover

    UTC is actually GMT (Greenwich Mean Time) (longitude 0 through Greenwich S.E London).
    OK Jimbo, you are now mixing two totally different things. UTC is not GMT, and it is most definitely not a "Yankee takeover".

    GMT is a time zone, UTC is time standard.

    Greenwich Mean Time (GMT) is often interchanged or confused with Coordinated Universal Time (UTC). But GMT is a time zone and UTC is a time standard.

    Although GMT and UTC share the same current time in practice, there is a basic difference between the two:
    • GMT is a time zone officially used in some European and African countries. The time can be displayed using both the 24-hour format (0 - 24) or the 12-hour format (1 - 12 am/pm).
    • UTC is not a time zone, but a time standard that is the basis for civil time and time zones worldwide. This means that no country or territory officially uses UTC as a local time.
    (Quote from GMT versus UTC)

    The current version of UTC is defined by International Telecommunications Union Recommendation (ITU-R TF.460-6)

    Time zones are told as comparison to UTC. Here in Western Europe, our normal time is UTC+1 (time zone CET), and summertime (daylight saving) is UTC+2 (time zone CEST). New York normal time, time zone EST, is UTC-5 and their summer time is time zone EDT which is UTC-4.

    Short: time zones are told as how many hours behind UTC (minus X hours), or ahead it (plus X hours) they are.

    Kari
      My Computer


  7. Posts : 8,642
    Windows 10 Home
    Thread Starter
       #7

    The formula worked - thank you.
      My Computer


  8. Posts : 17,661
    Windows 10 Pro
       #8

    Doc943 said:
    The formula worked - thank you.
    You are welcome
      My Computer


  9. Posts : 15,487
    Windows10
       #9

    Kari said:
    OK Jimbo, you are now mixing two totally different things. UTC is not GMT, and it is most definitely not a "Yankee takeover".

    GMT is a time zone, UTC is time standard.


    (Quote from GMT versus UTC)

    The current version of UTC is defined by International Telecommunications Union Recommendation (ITU-R TF.460-6)

    Time zones are told as comparison to UTC. Here in Western Europe, our normal time is UTC+1 (time zone CET), and summertime (daylight saving) is UTC+2 (time zone CEST). New York normal time, time zone EST, is UTC-5 and their summer time is time zone EDT which is UTC-4.

    Short: time zones are told as how many hours behind UTC (minus X hours), or ahead it (plus X hours) they are.

    Kari
    Except UTC was invented decades after people used GMT+1 etc. i.e. it was a de facto standard but not rigorously defined internationally.

    The problem with GMT was the imprecision of it and BST i.e. people got confused if their time differential was relative to GMT or BST, especially in countries that did not move in same way.

    UTC clarified that making it unambiguous.
      My Computer


  10. Posts : 11,247
    Windows / Linux : Arch Linux
       #10

    Hi folks
    I suppose also with GPS / Sat Navs etc the International standard is fine

    Was just having a bad day the other day -- two computers just wouldn't update and were driving me bonkers.
    I did enjoy that program about the Linconshire guy who tried to get Longitude sorted out -- in those days Ship navigation was ??? but people managed it !! amazing when some people get lost these days even with Sat Navs (or especially with Sat Navs).

    Glad all the excel stuff sorted out OK

    Cheers
    everybody

    jimbo
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 16:54.
Find Us




Windows 10 Forums