Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, and 2013. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Converting UNIX Date/Time Stamps.

# Converting UNIX Date/Time Stamps

by Allen Wyatt
(last updated July 12, 2014)

When you import information created by other computer programs, you may run into a situation where your data includes a date/time stamp created by UNIX. Once imported, you are then faced with the challenge of converting the date/time stamp to an Excel date/time format. Doing the conversion is rather easy, once you understand how both systems save their time.

Time stamps in UNIX are stored as an integer value representing the number of seconds since 1 January 1970. Further, time stamps are stored in GMT time, meaning there has been no adjustment to the stamp to reflect time zones or time-zone variations (such as Daylight Savings Time).

Excel, on the other hand, stores time stamps as a real number representing the number of days since 1 January 1900 (the default setting). The integer portion of the time stamp represents the number of full days, while the portion of the time stamp to the right of the decimal point represents the fractional portion of a day, which can be converted to hours, minutes, and seconds.

To do a straight conversion of a UNIX time stamp to the Excel system, all you need to do is use this formula:

```=UnixTime / 86400 + 25569
```

In this example, UnixTime can be either a named cell containing the integer UNIX time stamp value, or it can be replaced with the actual integer value. Since the UNIX time stamp is stored as seconds, the division by 86400 is necessary to convert to days, which is used by Excel. (86400 is the number of seconds in a day.) You then add 25569, which is the number of days between 1 January 1900 and 1 January 1970. (It is the value returned if you use the =DATE(1970,1,1) function.)

Remember, that this does a straight conversion. You may still need to adjust for time zones. If the UNIX system recorded something occurring at 5:00 pm local time, you need to determine how many hours difference there is between you and GMT. If there happens to be four hours, then you need to adjust your conversion formula accordingly, as shown here:

```=UnixTime / 86400 + 25569 - 4 / 24
```

If you are unsure of how your time zone relates to GMT, you can find the needed information here:

```http://tycho.usno.navy.mil/zones.html
```

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (10849) applies to Microsoft Excel 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Excel here: Converting UNIX Date/Time Stamps.

##### Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

##### MORE FROM ALLEN

Combining Cell Contents

Excel allows you to easily combine text together. The key is to understand and use the ampersand operator.

Discover More

Unwanted Vertical Lines in a Table

When you print a table that includes borders, those borders should be crisp and clear on the printout. If you get some ...

Discover More

Fonts Missing in Word

What are you to do if you find that you have no fonts available in Word, but they are available in other programs? There ...

Discover More

Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!

##### More ExcelTips (ribbon)

Calculating the First Business Day of the Month

Want to know which day of the month is the first business day? The easiest way to determine the date is to use the ...

Discover More

Entering Dates without Separators

When doing data entry into a worksheet, you might want to enter dates without the need to type the separators that are ...

Discover More

Determining If a Date is between Other Dates

Need to figure out if one date is between two other dates? There are a wide variety of formulaic approaches you could use ...

Discover More
##### Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. Youâ€™ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is one less than 6?

2016-04-04 23:45:36

Gulam Rabbani

Is there any way in Excel to go from a Unix timestamp of this
1415053243
to a readable date & time like this
Mon, 03 Nov 2014 22:20:43 GMT

2015-04-10 07:06:13

Nic

P.S. Format cell > Custom > yyyy-mmm-dd hh:mm:ss

2015-04-10 07:05:03

Nic

Hi Jim Mc.,

=((((A3)/86400)+(DATE(1970;1;1)-(DATE(1900;1;1))))+1)

A3 = 1415053243

+1 at the end is my time zone GMT +1

Regards,
Nic

2014-12-03 11:25:44

Jim Mc.

Is there any way in Excel to go from a Unix timestamp of this
1415053243
to a readable date & time like this
Mon, 03 Nov 2014 22:20:43 GMT

##### This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.