View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Ron Rosenfeld
 
Posts: n/a
Default 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