Convert Unix Timestamp to Excel Date
Table of contents
What is a Unix Timestamp?
A Unix timestamp is the number of seconds that have passed since January 1, 1970 midnight. This does not include the leap seconds.
How Excel handles date and time.
To convert a Unix timestamp to a readable date, let's first look at how Excel handles dates. As you read above, the Unix timestamp starts on January 1, 1970.
Excel started counting dates on January 1, 1900. Excel reads the date as a numerical number. In the table below you see the date in the left column as we read it, in the right column as Excel reads a date.
|1||January 1, 1900||1|
|2||Dec 15, 1995||35048|
|3||June 24, 2001||37066|
|4||July 13, 2003 3:00 PM||37832,63|
On the last line of the table above you see that a time has been added to the date. Because in Excel, a 24-hour day equals 1, an hour equals . Time can be represented in Excel as a fractional value of 1 (see table below). To display the value as a time format after a date, the time format must be added in the cell properties.
From Unix Timestamp to Excel Date
A Unix timestamp is like up here describes the number of seconds that have elapsed since January 1, 1970. A full day therefore consists of seconds (60 seconds x 60 minutes x 24 hours). If we divide the Unix timestamp by 86,400, we have the number of days from January 1, 1970. If we add the date value of January 1, 1970 (in Excel this is the number 25,569), we have the Excel date. We can do this using the formula: