Excel does not understand Unix timestamps, those 10 or 13 digit numbers that APIs, databases and log files use for dates. Paste 1700000000 into a cell and it stays a plain number. The fix is one small formula and a date format. If you only need to check a single value first, the free Timestamp Converter shows the date instantly, and you can use it to confirm your Excel result.
This guide gives the formula for seconds and milliseconds, a version for Bangladesh time, the formatting step people forget, and the fixes for the usual problems.
Why Excel needs a formula
A Unix timestamp counts seconds since midnight UTC on 1 January 1970. Excel counts days instead, from its own starting point, and stores the time of day as a fraction of a day. So the conversion has two parts: change seconds to days, then move the starting point from Excel's to 1970.
- There are 86,400 seconds in a day, so seconds divided by 86,400 gives days.
- The date 1 January 1970 is the number 25,569 in Excel. Writing
DATE(1970,1,1)gives that number without you having to remember it.
The formula for seconds
If the timestamp is in cell A2, in the next cell type:
=A2/86400+DATE(1970,1,1)
Then press Enter. For the sample value 1700000000 you will probably see 45244.92593. That is correct, it is just not formatted yet.
Step: format the cell as a date and time
- Select the cell (or the whole column of results).
- Press Ctrl+1 to open Format Cells.
- Choose Custom.
- In the Type box, enter
yyyy-mm-dd hh:mm:ssand press OK.
Now the cell shows 2023-11-14 22:13:20. The number underneath has not changed, only how it is displayed. You can use other formats too: dd-mmm-yyyy for a date only, or dd/mm/yyyy hh:mm if that is how your team writes dates.
If you only want the date and not the time of day, wrap the formula in INT:
=INT(A2/86400+DATE(1970,1,1))
The formula for milliseconds
JavaScript, many mobile apps and some APIs give 13-digit timestamps, which are in milliseconds. Divide by 86,400,000 instead:
=A2/86400000+DATE(1970,1,1)
To show the milliseconds too, use the format yyyy-mm-dd hh:mm:ss.000. For 1700000000123 that gives 2023-11-14 22:13:20.123.
A quick way to tell which formula you need is to count the digits. 10 digits is seconds, 13 is milliseconds.
Showing Bangladesh time, not UTC
A Unix timestamp is always UTC, so the result above is UTC. Bangladesh Standard Time is six hours ahead. Add six hours, written as a fraction of a day:
=A2/86400+DATE(1970,1,1)+6/24
For 1700000000 the result is 2023-11-15 04:13:20. Notice that the date moved to the next day, because 22:13 in UTC is already past midnight in Dhaka. For another zone, change the 6 to the offset, for example 5.5 for India or -5 for New York in winter.
This fixed offset is fine for Bangladesh. If your data crosses places that change their clocks for daylight saving, a plain hour offset can be wrong by an hour for part of the year. For one-off checks across such zones, the Timestamp Converter has a time zone list that handles it for you.
Converting a whole column
Type the formula in the first result cell, then double-click the small square at its bottom-right corner to fill it down the column. If the formula refers to A2, each row will refer to its own row automatically.
When you want to keep the dates and remove the formulas, copy the result cells, right-click, and choose Paste Special, then Values. After that you can delete the original timestamp column.
The reverse: date to Unix timestamp
To turn an Excel date in A2 into seconds:
=(A2-DATE(1970,1,1))*86400
Format the result as Number with 0 decimal places. This treats the date as UTC. If your date is in Bangladesh time, subtract six hours first:
=(A2-DATE(1970,1,1)-6/24)*86400
For milliseconds, multiply by 86,400,000 instead.
Common problems and how to fix them
The cell shows
The column is too narrow for a full date and time. Double-click the edge of the column header to widen it. If it still shows ####, the result is a date before 1900 (a negative or tiny timestamp). Excel cannot show those.
The cell shows 45244.92593, not a date
The cell is still formatted as General. Apply the custom format described above.
The result is a date in 1970
You divided a millisecond timestamp by 86,400 instead of 86,400,000, or the value is already in days. Count the digits and use the right formula.
The result is #### or #VALUE!
A 13-digit millisecond value divided by 86,400 gives a date thousands of years away, beyond what Excel can show, so you see ####. Use 86,400,000. A #VALUE! error usually means the cell contains something that is not a plain number, such as a hidden space, a letter or a pasted ts= prefix. Clean it first:
=TRIM(CLEAN(A2))/86400+DATE(1970,1,1)
The timestamp itself looks wrong, like 1.7E+12
Excel shows long numbers in scientific form when the column is narrow. Widen the column or format it as Number with no decimals. The value is not damaged.
Microsecond or nanosecond timestamps lose their last digits
Excel keeps only 15 significant digits. A 16-digit microsecond value such as 1700000000123456 is rounded, and when you type or paste it as a number, the digits after the fifteenth become zeros. If the value is stored as text, you can take the first 10 digits for the seconds:
=LEFT(A2,10)/86400+DATE(1970,1,1)
That gives the date to the second, which is all that Excel can reliably keep anyway.
Checking your result
Before you convert thousands of rows, test one. Paste the same timestamp into the Timestamp Converter. It detects whether the number is in seconds, milliseconds, microseconds or nanoseconds, and shows the date in UTC and in any time zone you choose. For 1700000000 the UTC row reads Tue, 14 Nov 2023 22:13:20 GMT, which should equal your Excel cell when you used the plain formula.
If you have a long list and prefer not to use formulas, paste it into Batch convert, one timestamp per line, and press Download CSV. The file has the columns timestamp, unit, utc_iso and zone_iso. The date columns are written as ISO 8601 text, so depending on your Excel version they may arrive as text rather than as real dates. If you need real Excel dates, the formula is the more reliable route. The page works in your browser, so the list is not uploaded.
For a full tour of the converter, read the Timestamp Converter guide.
Related tools
- CSV to Excel: turn a CSV export from a database or API into a spreadsheet.
- JSON to Excel: turn an API response with timestamp fields into a workbook.
- Developer Tools: the rest of our developer utilities.
The same formula in Google Sheets
Google Sheets counts days the same way, so =A2/86400+DATE(1970,1,1) works there as well. Format the column with Format, Number, Date time (or a custom format).
Quick checklist
- Seconds:
=A2/86400+DATE(1970,1,1). - Milliseconds:
=A2/86400000+DATE(1970,1,1). - Add
+6/24for Bangladesh time. - Format the cell as
yyyy-mm-dd hh:mm:ss. - Test one value in the Timestamp Converter before filling down.



