ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Displaying Unix time as date and time (https://www.excelbanter.com/excel-discussion-misc-queries/91309-displaying-unix-time-date-time.html)

[email protected]

Displaying Unix time as date and time
 
I am trying to convert a unix timestamp to date and time in XL 2003.
Any ideas?

-Thanks


Ron Rosenfeld

Displaying Unix time as date and time
 
On 30 May 2006 12:16:40 -0700, wrote:

I am trying to convert a unix timestamp to date and time in XL 2003.
Any ideas?

-Thanks


Unix time is merely the number of seconds since 01 Jan 1970 00:00 UTC

Excel time is expressed in decimal days.

There are 86,400 seconds in a day.

So to convert a Unix timestamp to XL time

=UnixTime/86400+DATE(1970,1,1)

Format to something you like.

Correct of the difference between UTC and your time zone if you want.


--ron


All times are GMT +1. The time now is 09:41 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com