[R] Date format

Prof Brian D Ripley ripley at stats.ox.ac.uk
Fri Mar 30 21:20:34 CEST 2001


On Fri, 30 Mar 2001, Yu-Ling Wu wrote:

> Hi,
>
> I try to convert a string into date format.
> Please see the following two examples. When the
> time is midnight (i.e. 00:00:00), R can't convert
> it correctly and get a value of "NA". How to make
> it work and get the value of "2001-03-23 00:00:00"?

That's not a valid time, so you can't.  (OS-specific, possibly, as it
depends on the underlying OS features, but true on Solaris and Linux.)

You can set a POSIXlt structure directly, of course.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list