Skip to content
Back to formatted view

Raw Message

Message-ID: <Pine.GSO.4.21.0005220841110.15596-100000@mail.biostat.washington.edu>
Date: 2000-05-22T15:44:50Z
From: Thomas Lumley
Subject: handling dates
In-Reply-To: <61411576E951D211AF330008C7245DD905379B06@ntmsg0005.corpmail.telstra.com.au>

On Mon, 22 May 2000, Strumila, John wrote:

> howdy R friends,
> 
> Can anyone help me with converting a 'unix' date (seconds since 1970) into
> something readable?
> 
> There doesn't seem to be anything in the 'date' package and the prospect of
> calculating this myself doesn't excite me.

Well, if you take a date and divide by 60*60*24 you have days since the
zero date. You can then add this to the zero date.  

   date<-mdy.date(1,1,1970)+unixdate/(60*60*24)


	-thomas


Thomas Lumley
Assistant Professor, Biostatistics
University of Washington, Seattle

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._