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.
To convert date to timestamp, a formula can work it out.
Select a blank cell, suppose Cell C2, and type this formula =(C2-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.
Remove Time From DateTime
In Excel, to remove 12:11:31 from 1/21/2017 12:11:31 and make it exactly 1/21/2017, you may have to take some time to create a formula to handle this job. However, the Remove time from date utility of Kutools for Excel can quickly remove timestamp permanently from the date time formatting in Excel.
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.
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.
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.
3. The above formula converts 10-digits number to a standard datetime, if you want to convert 11-digits number, or 13-digits number, or 16-digits number to a standard datetime in Excel, please use formula as below:
Convert 11-digits number to date: =A1/864000+DATE(1970,1,1)
Convert 13-digits number to date: =A1/86400000+DATE(1970,1,1)
Convert 16-digits number to date: =A1/86400000000+DATE(1970,1,1)
For different lengths of number which needed to be converted to datetime, just change the number of zeros of the divisor in the formula to correctly get the result.
Tip: If you are in trouble with remembering complex formulas, here the Auto Text tool of Kutools for Excel can save all formulas you used in a pane for you, then, you can reuse them in anywhere anytime, what you only need to do is change the references to match your real need. Click for free download it now.
How to convert date time from one time zone to another in Excel?
This article will show you how to convert date time from one time zone to another in Excel.
How to split date and time from a cell to two separated cells in Excel?
For instance, you have a list of data mixed with date and time, and you want to split each of them into two cells, one is date and another is time as below screenshots shown. Now this article provides you two quick methods to solve it in Excel.
How to convert date/time format cell to date only in Excel?
If you want to convert date-time format cell to date value only such as 2016/4/7 1:01 AM to 2016/4/7, this article can help you.
How to remove time from date in Excel?
If there has a column of date with time stamp, such as 2/17/2012 12:23, and you don’t want to retain the time stamp and want to remove the time 12:23 from the date and only leave the date 2/17/2012. How could you quickly remove time from date in mulitple cells in Excel?
How to combine date and time into one cell in Excel?
There are two columns in a worksheet, one is the date, the other is time. Is there any way to quickly combine these two columns into one, and keep the time format? Now, This article introduces two ways in Excel to combine date column and time column into one and keep the time format.