문제

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.

도움이 되었습니까?

해결책

Because %y is not %Y:

R> as.Date("06/10/2013", "%m/%d/%Y")   # note capital-Y
[1] "2013-06-10"
R> 
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top