Convert Excel Date to Unix Time Stamp (or Time Stamp to Excel Date)

This post will guide you how to convert a date string to a Unix time stamp in Excel. How do I convert excel date to Unix timestamp with a formula in Excel. How to convert Unix time stamp to an excel date string in Excel.

Convert Excel Date to Unix Time Stamp


If you want to convert the excel date string to unix time stamp in Excel, you can create a formula based on the DATE function.

For Example, you have a list of data that contain dates, and you want to convert each date to unix time stamp. You can use the following formula.

=(A1-DATE(1970,1,1))*86400

Type this formula into a blank cell and press Enter key and then drag the AutoFill handle from Cell B1 to B5.

convert date to unix timestamp1

Convert Unix Time Stamp to Excel Date


To convert a unix time stamp to an excel date string in Excel, you can use a formula based on the Date function. Like this:

=(((B1/60)/60)/24)+DATE(1970,1,1)

Type this formula into a cell and press Enter key, and then drag the AutoFill Handle from Cell C1 to C5.

convert date to unix timestamp2

Then you need to select the range of cells C1:C5, and right click on it, and select Format Cell from the popup menu list. And the Format Cell dialog will open. Click Date under Category list box, and then click OK button.

convert date to unix timestamp3

convert date to unix timestamp5

Let’s see the result:

 

convert date to unix timestamp4

Related Functions


  • Excel DATE function
    The Excel DATE function returns the serial number for a date.The syntax of the DATE function is as below:= DATE (year, month, day)…
Related Posts

If Cell is This Value or That Value

IF function is frequently used in Excel worksheet to return you expect “true value” or “false value” based on the result of logical test. If you want to see if a cell is A or B, and if one of ...

If Value is Greater Than A Certain Value
If Value is Greater Than A Certain Value 1

IF function is frequently used in Excel worksheet to return you expect “true value” or “false value” based on the logical test result. If you want to see if a value in one cell is greater than a specific value, ...

If Cell is Not Blank
If Cell is Not Blank 6

IF function is frequently used in Excel worksheet to return you expect “true value” or “false value” based on the result of created logical test. If you want to see if a cell is blank or not, and leave some ...

If Cell is Blank
If Cell is Blank_1

IF function is frequently used in Excel worksheet to return you expect “true value” or “false value” based on the result of created logical test. If you want to see if a cell is blank or not, and leave some ...

If Cell Equals Certain Text String
If cell equals certain text_1

IF function is frequently used in Excel worksheet to return you expect “true value” or “false value” based on the result of created logical test. If you want to see if cell equals a certain text string like “Win”, you ...

If Cell Contains Either Text1 or Text2
If cell contains text1 or text2_1

IF function is frequently used in Excel worksheet to return “true value” or “false value” based on the logical test result. If you want to see if cell contains certain substring1 like “abc” or substring2 like “def”, and returns true ...

If Cell Contains Certain Text OR Equals Certain Text

IF cell equals certain text IF function is frequently used in Excel worksheet to return “true value” or “false value” based on the logical test result. If you want to test values to see if they equal certain text like ...

VLOOKUP From Another Sheet Not Working
vlookup from another sheet not working3

In the previous post, you should know that how to fix or remove the #N/A error when using VLOOKUP formula to lookup value from another sheet. And this post will show you reasons why your VLOOKUP formula is not working ...

If Cell Begins with One of Three Supplied Characters
If Cell Begins with One of Three Supplied Characters

If you want to test values to see if they begin with some given specific characters like “x”, ”y”, or “z”, you can create a formula with COUNTIF and SUM functions to return results. EXAMPLE You can see “TRUE” or ...

Fix #N/A Error For VLOOKUP From Another Sheet
vlookup from anther sheet not working1

This post will show you how to fix the #N/A error why it occurs when you extract values from another sheet using VLOOKUP function in Excel 2016,2013,2010 or other Excel versions. How can you correct a #N/A error in VLOOKUP ...

Sidebar