Search code examples
excelexcel-formula

Epoch Unix Value formula


I'm converting dates in Excel from this format:

e.g. 12/1/24 12:00AM to Epoch timestamps using following formula:

=(A1-DATE(1970,1,1))*86400

which gives me the output value 1733011200. This is correct, but I need the output Epoch formatting to always give me dates with 8AM timestamps. How can I adjust the formula for that?

Thanks in advance for your help!


Solution

  • Epoch timestamps do not have any special formatting. Your statement of formatting to always give me dates with 8AM timestamps. does not seem to be meaningful.

    If what you mean is that you want to return a value that represents 8AM on the date of the Epoch timestamp, then you can simply add the relevant number of seconds to the timestamp for the start of that date. eg:

     =(INT(A1)-DATE(1970,1,1))*86400+28800
    

    (28800 is the number of seconds in 8 hours)

    If you mean something else, you will need to be more specific.