Master the formulas and techniques to accurately convert Unix epoch time to human-readable dates and back within Microsoft Excel.
Last updated: 2025-12-10
=A1/86400 + DATE(1970,1,1)=(A1 - DATE(1970,1,1)) * 86400The magic formula to convert a Unix timestamp in seconds (e.g., in cell A1) is:
Assuming A1 contains a Unix timestamp in seconds:
=A1/86400 + DATE(1970,1,1)Here’s why it works:
A1/86400: Divides your timestamp by the number of seconds in a day (24 hours * 60 minutes * 60 seconds = 86400). This calculates how many days have passed since the Unix Epoch.DATE(1970,1,1): This is Excel's internal serial number for the Unix Epoch start date (January 1, 1970).Click on an empty cell (e.g., B1) and type the formula, replacing `A1` with the cell containing your timestamp.
=A1/1000/86400 + DATE(1970,1,1)After entering the formula, Excel will show a number (e.g., `45353.5`). This is Excel's "serial date". You must format it to see a readable date.
yyyy-mm-dd hh:mm:ssThis formula calculates the difference between your date and the Unix epoch start date, then converts the resulting number of days into seconds.
Assuming A1 contains a valid Excel date/time:
=(A1 - DATE(1970,1,1)) * 86400To get millisecond precision, simply multiply the seconds-based result by 1000.
Assuming A1 contains a valid Excel date/time:
=(A1 - DATE(1970,1,1)) * 86400 * 1000Excel's date system is not timezone-aware. To adjust for a specific timezone, you must manually add or subtract the offset. The offset is represented as a fraction of a day (e.g., 8 hours is 8/24).
To add 8 hours for a UTC+8 timezone:
= (A1/86400 + DATE(1970,1,1)) + 8/24VALUE() function to convert text-formatted numbers.Q: What is the formula to convert Unix timestamp to date in Excel?
A: For seconds in cell A1, use =A1/86400 + DATE(1970,1,1). For milliseconds, use =A1/1000/86400 + DATE(1970,1,1). Then, format the cell as a date.
Q: How do I handle timezones in Excel?
A: Manually add or subtract the offset. For UTC+8, add 8/24 to the formula. Be aware this is a fixed offset and won't adjust for Daylight Saving Time.
Q: Why does my formula just show a big number?
A: You need to format the result cell. Right-click > Format Cells > Date.