Date conversion in R not registering string correctly -


can please tell me why doesn't work:

as.date("01/08/15", format = "%m/%d/%y") [1] "0015-01-08" 

thanks!

you need use lower-case %y. upper-case %y requires 4-digit year. (in opinion, entire command should have failed error message, unfortunately didn't.) see strptime(), documents format codes.

as.date("01/08/15", format = "%m/%d/%y") ## [1] "2015-01-08" 

Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -