Re: [R] ACCESS R and dates

From: Prof Brian Ripley <>
Date: Sun 02 Oct 2005 - 06:02:47 EST

On Fri, 30 Sep 2005, sloan jones wrote:

> I have used the RODBC package to read in data I have stored in an Access
> file. When I am using data from files other than ACCESS I have no
> problem using the survival package to work with dates; however, with the
> ACCESS data the dates are reading-in in the following format:
> "2004-02-11 Pacific Standard Time". How do I remove the "Pacific
> Standard Time" part in ACCESS or R so that I can coerce the data into a
> workable format? Any suggestions?

If this really is a character vector and not the result of printing a "Date" object, see ?strftime. But you haven't told us anything like enough to go on.

As far as I know the survival package expects numeric values (e.g. of days or years) and not dates as implemented in R, except for survexp() which wants a different format, that of the 'dates' package (which it partially incorporates).

Brian D. Ripley,        
Professor of Applied Statistics,
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________ mailing list
PLEASE do read the posting guide!
Received on Sun Oct 02 06:09:25 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 18:08:08 EST