as.Date on "POSIXct" "POSIXt"

28 views
Skip to first unread message

christoph.schlaechter

unread,
Apr 23, 2014, 7:29:19 AM4/23/14
to ggp...@googlegroups.com
Hello,

since MS Office 2013 64bit I have to use XLConnect to load Excel workbooks. Before I have used RODBC which is everything I need. At work I have to use the "newest" Excel version.

I don'rt want to waste time to convert all the date into textfiles. I want to load from the origin directly. In this case the "wonderful" MS Excel.

With RODBC i could easily convert to as.Date.

Now with XLConnect I just want to convert from POSIX to Date.

I have a vector called test with Dates from 2010-01-01 to 2013-12-31.

class(test)
"POSIXct" "POSIXt"

When I use as.Date(test) it adds 2009-12-31 in the first row of the vector and removes the last row with the entry 2013-12-31.

I really don't understand.


Can somebody please help me to fix this?

Thank you very much.

Ista Zahn

unread,
Apr 23, 2014, 9:51:02 AM4/23/14
to christoph.schlaechter, ggplot2
Hello,

This doesn't seem to have anything to do with ggplot2, and so is
off-topic for this list. Consider posting on stackoverflow, or on the
r-help mailing list, and be sure to include a reproducible example
(instructions for doing so can be found in the footer of this
message).

Best,
Ista

B
> --
> --
> You received this message because you are subscribed to the ggplot2 mailing
> list.
> Please provide a reproducible example:
> https://github.com/hadley/devtools/wiki/Reproducibility
>
> To post: email ggp...@googlegroups.com
> To unsubscribe: email ggplot2+u...@googlegroups.com
> More options: http://groups.google.com/group/ggplot2
>
> ---
> You received this message because you are subscribed to the Google Groups
> "ggplot2" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ggplot2+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages