Because %y
is not %Y
:
R> as.Date("06/10/2013", "%m/%d/%Y") # note capital-Y
[1] "2013-06-10"
R>
Frage
Like the title says,
>as.Date("06/10/2013", "%m/%d/%y") # returns "2020-06-2013
[1] "2020-06-10"
What is causing this? I'm using windows with 32-bit RGui and the latest zoo package.
Thanks.
Lösung
Because %y
is not %Y
:
R> as.Date("06/10/2013", "%m/%d/%Y") # note capital-Y
[1] "2013-06-10"
R>