Ok... this is one of the more 'geekier' posts I've written, but I was trying to convert a Unix epoch (the number of seconds from January 1, 1970) to a standard time using Microsoft Excel. I found a solution online, but it didn't work completely for me, so I thought I would add my solution here, mostly so that when I need to use it again, I'll be able to find it!
Searching Google, I had found this site which converted the epoch for me but I kept coming up with the wrong date and time... All the times were about four years in the future. Obviously, that was wrong, which I knew because I converted one of the times using another converter I had. The formula I was using was this:
=((epoch - 25200) / 86400) + 25569
Then I remembered, being on Mac OS, that day 0 is January 1, 1904. When I subtracted the extra four years from the formula, I got the right time. So, on a Mac, the correct formula is this:
=((epoch - 25200) / 86400) + 24106
So, here you go. The next time you are faced with using an epoch time and having to convert it to a standard time, you can use these formulas for whichever OS you are using.
There are no comments for this post.
Leave a Comment
Keep in contact with Bravo IT Consulting by signing up for our newsletter.
Any IT problems I have had he has resolved within minutes. Very knowledgable.
Kelly Ringer-Radetich Golden Gate Sotheby's International Realty, San Carlos, CA
Frank has set up my website and email accounts in a very innovative manner. My email was a mess, it is now the best. He is very good to work with, listens to your needs and adds his own suggestions. He is also quite reasonable in his billings. I highly recommend his services.
Robert Sands San Carlos, CA
Frank is very friendly to work with, easily understands what we have conveyed to him and offers a quick turn around. His rates are reasonable and he is willing to work with smaller budgets. Need a Web Developer?...this is the guy to contact!
Wendy Quaccia San Carlos, CA
Frank has been helping me with my Apple computer and other technology needs for several years now. He is knowledgable, capable and very patient. I highly recommend Frank. Go on his website to see all the terrific ways he is able to support people with technology.