Re: [R] Date formats in as.Date

2009-09-24 Thread Gabor Grothendieck
Try this: > library(zoo) > as.yearmon("Sep-1981", "%b-%Y") [1] "Sep 1981" > as.Date(as.yearmon("Sep-1981", "%b-%Y")) [1] "1981-09-01" > as.Date(paste(1, "Sep-1981"), "%d %b-%Y") [1] "1981-09-01" On Thu, Sep 24, 2009 at 7:15 PM, Worik R wrote: > I have trouble with this: > > as.Date("Sep-1981"

Re: [R] Date formats in as.Date

2009-09-24 Thread Jim Porzak
Worik, You need a day! as in: as.Date("1-Sep-1981", format="%d-%b-%Y") ## first of the month HTH, Jim Porzak Ancestry.com San Francisco, CA www.linkedin.com/in/jimporzak use R! Group SF: www.meetup.com/R-Users/ On Thu, Sep 24, 2009 at 4:15 PM, Worik R wrote: > I have trouble with this: > >