Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert Unix Epoch Time to Date in Google Sheets

I have a sheet with a column of unix epoch times (in seconds): 1500598288

How can I convert these into normal dates?

like image 464
Mike Bjorge Avatar asked Jul 21 '17 01:07

Mike Bjorge


People also ask

How do I convert Epoch to date?

Because our Epoch time is specified in milliseconds, we may convert it to seconds. To convert milliseconds to seconds, first, divide the millisecond count by 1000. Later, we use DATEADD() to add the number of seconds since the epoch, which is January 1, 1970 and cast the result to retrieve the date since the epoch.

How do I convert Unix timestamp to date in Excel?

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.

How do I convert epoch time to manual date?

You can take an epoch time divided by 86400 (seconds in a day) floored and add 719163 (the days up to the year 1970) to pass to it. Awesome, this is as manual as it gets.


1 Answers

The simplest way, not requiring any JS programming, would be through a formula, dividing by 86400 seconds per day and adding to January 1, 1970. For example the following gives 21 July 2017:

=1500598288/86400+date(1970,1,1) 

To convert a whole column of numbers, just use ARRAYFORMULA:

=arrayformula(A:A/86400+date(1970,1,1)) 
like image 64
ttarchala Avatar answered Oct 07 '22 22:10

ttarchala