as often I have problems with the conversion of dates in R. Can anybody explain the following behavior to me?
as.Date('Dec-28-2003', '%b-%d-%Y') # returns NA
as.Date('Jan-04-2004', '%b-%d-%Y') # returns 2004-01-04
as often I have problems with the conversion of dates in R. Can anybody explain the following behavior to me?
as.Date('Dec-28-2003', '%b-%d-%Y') # returns NA
as.Date('Jan-04-2004', '%b-%d-%Y') # returns 2004-01-04
Sorry, I got the answer. It's about the language setting, my R recognizes German dates only, i.e.
as.Date('Dez-28-2003', '%b-%d-%Y')
as in Dezember instead of December works fine. I used the lubricate package instead.
mdy('Dec-28-2003') # returns 2003-12-28