Re: [R] Weird Excel Time Format

2011-11-29 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Hasan Diwan > Sent: Tuesday, November 29, 2011 10:16 AM > To: Prof Brian Ripley > Cc: R Project Help > Subject: Re: [R] Weird Excel Time Format > >

Re: [R] Weird Excel Time Format

2011-11-29 Thread Kevin E. Thorpe
On 11/29/2011 01:39 PM, Hasan Diwan wrote: On 29 November 2011 10:26, Jeff Newmiller wrote: For my part, I highly recommend exporting to CSV before importing to R. Will look into doing so... I don't think this point can be stressed enough. I have had too many bad experiences with dates i

Re: [R] Weird Excel Time Format

2011-11-29 Thread Hasan Diwan
On 29 November 2011 10:26, Jeff Newmiller wrote: > You haven't indicated how you are accessing the Excel file, or whether it is > an XLS or XLSX file. It sounds like you might be using rcom or a dependent > package, in which case you may need to read the Excel COM interface > documentation more

Re: [R] Weird Excel Time Format

2011-11-29 Thread Jeff Newmiller
You haven't indicated how you are accessing the Excel file, or whether it is an XLS or XLSX file. It sounds like you might be using rcom or a dependent package, in which case you may need to read the Excel COM interface documentation more carefully. In any event, you can't expect as.Date to und

Re: [R] Weird Excel Time Format

2011-11-29 Thread Hasan Diwan
On 29 November 2011 09:32, Prof Brian Ripley wrote: > If all else fails, read the help page.  There are examples on ?as.Date of > reading Excel dates. I did, it seems there is either (a) a problem with my code, or (b) a problem with the documentation. See below: > rawtimeColumn [1] 39406.577662037

Re: [R] Weird Excel Time Format

2011-11-29 Thread Prof Brian Ripley
If all else fails, read the help page. There are examples on ?as.Date of reading Excel dates. But I don't believe the time you give. (0.577662037 is just before 13:51:50). On Tue, 29 Nov 2011, Hasan Diwan wrote: I have a 10-column XLS file, with 2 date fields. As far as I can tell, they we

[R] Weird Excel Time Format

2011-11-29 Thread Hasan Diwan
I have a 10-column XLS file, with 2 date fields. As far as I can tell, they were configured identically in Excel 2010. One of these fields resembles "39406.577662037", whilst in Excel, it is shown as "2007-11-20 13:42:20". Applying as.Date() with the default format doesn't do it. Any ideas as to wh