[R] Weird Excel Time Format
Jeff Newmiller
jdnewmil at dcn.davis.ca.us
Tue Nov 29 19:26:12 CET 2011
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 understand the floating-point numbers as if they were formatted dates it they aren't.
For my part, I highly recommend exporting to CSV before importing to R.
---------------------------------------------------------------------------
Jeff Newmiller The ..... ..... Go Live...
DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded Controllers) .OO#. .OO#. rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.
Hasan Diwan <hasan.diwan at gmail.com> wrote:
>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 what format this is? Many thanks! -- H
>
>--
>Sent from my mobile device
>Envoyait de mon portable
>
>______________________________________________
>R-help at r-project.org mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list