Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in


How to convert between date and Unix timestamp in Excel?

Unix timestamp is also called Epoch time or POSIX time which is wildly used in many operating systems or file formats. This tutorial is talking about the conversion between date and Unix timestamp in Excel.

Convert date to timestamp

Convert date and time to timestamp

Convert timestamp to date

arrow blue right bubble Convert date to timestamp

Tabbed browsing & editing multiple Excel workbooks/Word documents as Firefox, Chrome, Internet Explore 10!

You may be familiar to view multiple webpages in Firefox/Chrome/IE, and switch between them by clicking corresponding tabs easily. Here, Office Tab supports similar processing, which allow you to browse multiple Excel workbooks or Word documents in one Excel window or Word window, and easily switch between them by clicking their tabs. Click for free 45-day trial of Office Tab!

ot excel

To convert date to timestamp, a formula can work it out.

Select a blank cell and type this formula =(A1-DATE(1970,1,1))*86400 into it and press Enter key, if you need, you can apply a range with this formula by dragging the autofill handle. Now a range of date cells have been converted to Unix timestamps.

arrow blue right bubble Convert date and time to timestamp

There is a formula that can help you convert date and time to Unix timestamp.

1. Firstly, you need to type the Coordinated Universal Time into a cell, 1/1/1970. See screenshot:

2. Then type this formula =(A1-$C$1)*86400 into a cell, press Enter key, then if you need, drag the autofill handle to a range with this formula. See screenshot:

Tips: In the formula, A1 is the date and time cell, C1 is the coordinate universal time you typed.

arrow blue right bubble Convert timestamp to date

If you have a list of timestamp needed to convert to date, you can do as below steps:

1. In a blank cell next to your timestamp list and type this formula =(((A1/60)/60)/24)+DATE(1970,1,1), press Enter key, then drag the auto fill handle to a range you need.doc-convert-date-unix-4

2. Then right click the cells used the formula, and select Format Cells from the context menu, then in the popping Format Cells dialog, under Number tab, click Date in the Category list, then select the date type in the right section.

3. Click OK, now you can see the Unix timestamps have been converted to dates.


1. A1 indicates the timestamp cell you need.

2. This formula also can use to convert timestamp series to date and time, just format the result to the date and time format.

Quickly and easily convert date to other date formatting in Excel

The Apply Date Formatting of Kutools for Excel can quickly convert a standard date to the date formatting as you need as, such as only display month, day, or year, date format in yyyy-mm-dd, yyyy.mm.dd and so on. , click for full- featured  free trail in 60 days!
doc apply date format
Kutools for Excel: with more than 300 handy Excel add-ins, free to try with no limitation in 60 days.

Recommended Productivity Tools for Excel

Kutools for Excel Helps You Always Finish Work Ahead of Time, and Stand Out From Crowd

  • More than 300 powerful advanced features, designed for 1500 work scenarios, increasing productivity by 70%, give you more time to take care of family and enjoy life.
  • No longer need memorizing formulas and VBA codes, give your brain a rest from now on.
  • Become an Excel expert in 3 minutes, Complicated and repeated operations can be done in seconds, 
  • Reduce thousands of keyboard & mouse operations every day, say goodbye to occupational diseases now.
  • 110,000 highly effective people and 300+ world-renowned companies' choice.
  • 60-day full features free trial. 60-day money back guarantees. 2 years of free upgrade and support.

Brings Tabbed Browsing and Editing to Microsoft Office, Far More Powerful Than The Browser's Tabs

  • Office Tab is designed for Word, Excel, PowerPoint and Other Office Applications: Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Myles F · 1 years ago
    One thing to note is that the above is for epoch time in seconds. If you need milliseconds, you need to add a further multiplication / division by 1000. For example, converting from epoch time (milliseconds) to a date would be "=((((A1/1000)/60)/60)/24)+DATE(1970,1,1)".
    • To post as a guest, your comment is unpublished.
      Myles F · 1 years ago
      As a side note, the best way to tell if it's seconds or milliseconds is looking at the length of the field; if it's 10 digits, it's seconds, and if it's 13 digits, it's milliseconds. "=LEN(A1)" will tell you how long the value is.
      • To post as a guest, your comment is unpublished.
        Myles F · 1 years ago
        If that's too much manual work for you (or you have a list that's mixed between seconds and milliseconds), then you can use the following formula to automatically switch between seconds and milliseconds based on the length of the cell: "=((A1/86400)/IF(LEN(A1)=13,1000,1))+DATE(1970,1,1)".
  • To post as a guest, your comment is unpublished.
    Lilian · 1 years ago
    I followed your instructions here, but I get ########## in my excel file. I formatted it to date time. Any suggestions?
    • To post as a guest, your comment is unpublished.
      Boe · 1 years ago
      Had the same problem, but I figured it out. The cell has to have number format, not date format...
    • To post as a guest, your comment is unpublished.
      fuad · 1 years ago
      yeah me too, I got the same problem
    • To post as a guest, your comment is unpublished.
      The Slenderman · 1 years ago
      Normally you see ########## if there's too much information to display for how big you have your cells. Enlarge your cell size and see if that resolves the issue.
    • To post as a guest, your comment is unpublished.
      Sunny · 1 years ago
      Excuse me, could you tell me which part did not work in your file? Could you upload the detail screenshot for me to have a look?
      • To post as a guest, your comment is unpublished.
        Scott Miller · 1 years ago
        Goggle for "excel convert timestamp to date". Google, grabbing the first answer which is for date to timestamp, gives the answer of "=(A1-DATE(1970,1,1))*86400", which is what Sunny was probably doing. Only if you actually read the content of this page does it become obvious that the actual formula should be something else. To keep the time portion of the timestamp, the formula should be this for UTC "=(A1+DATE(1970,1,1)*86400)/86400". For US Central time, "=(F2+DATE(1970,1,1)*86400-21600)/86400"
  • To post as a guest, your comment is unpublished.
    Andrey · 2 years ago
    Thank you!

    (Your comment is too short! - it was responce to my first line, so I just add this junk :P )
    • To post as a guest, your comment is unpublished.
      VAS · 1 years ago
      Using =(((((G2/1000)/60)/60)-8)/24)+DATE(1970,1,1) for PST