+ Reply to Thread
Results 1 to 5 of 5

EPOCH Time Conversion to local time and daylight savings time (DST)

  1. #1
    Registered User
    Join Date
    06-20-2013
    Location
    Atlanta, GA
    MS-Off Ver
    365
    Posts
    28

    EPOCH Time Conversion to local time and daylight savings time (DST)

    Hi All,

    I am trying to convert a list of EPOCH dates/times to readable local time (EST). Currently I am using the formula =((A1-14400)/86400)+25569 and it works until it hits the DST time.
    Is there a formula that would account for the local time (EST) as well as account for DST without having to manually change the formula to match the DST.

    Attached is a sample worksheet.

    Conversion Data.xlsx

    Thanks

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: EPOCH Time Conversion to local time and daylight savings time (DST)

    Assuming we are in the same year, you need to know the start and end dates of DST
    3/8/15 2:00 AM in E2
    11/1/15 2:00 AM in E3

    =IF(AND(B2>E2, B2<E3), B2-"1:00", B2)
    Does that work for you?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    06-20-2013
    Location
    Atlanta, GA
    MS-Off Ver
    365
    Posts
    28

    Re: EPOCH Time Conversion to local time and daylight savings time (DST)

    Hi ChemistB,

    Thanks for the guidance.

    I modified the formula you provided to **=IF(AND(A1>1425798000,A2<1446361200),(A1-14400)/86400+25569,(A1-18000)/86400+25569)**
    Replaced the Start and End dates of DST in E2 and E3 to the actual EPOCH times.

    This works for me, but wanted to check with you first if you would also approach it the same way?

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: EPOCH Time Conversion to local time and daylight savings time (DST)

    Yes, that's probably how I would do it.

  5. #5
    Registered User
    Join Date
    06-20-2013
    Location
    Atlanta, GA
    MS-Off Ver
    365
    Posts
    28

    Re: EPOCH Time Conversion to local time and daylight savings time (DST)

    Thanks again for the help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Convert time accounting for daylight savings [Australian (non-US) dates]
    By AdamJaffrey in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 09-15-2016, 11:30 PM
  2. Daylight saving time
    By nsv in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 09-04-2016, 04:13 PM
  3. [SOLVED] Calculation change for the daylight savings time change
    By icetoken in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-02-2015, 10:22 AM
  4. Convert date/time FROM UTC into EST with daylight savings.
    By mikeJ64 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-04-2015, 01:27 PM
  5. Using VBA to get system time in GMT equivalent instead of local time
    By kuraitori in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-03-2009, 06:12 PM
  6. [SOLVED] Excel VB determining if eastern standard or daylight savings time
    By Heidi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-14-2005, 04:40 PM
  7. daylight savings time on vlookup
    By guideme in forum Excel General
    Replies: 5
    Last Post: 06-12-2005, 05:05 PM

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