There are many ways to do this in R. See R News 4/1 for info on dates. Here is one method:
> library(chron) > mdy <- month.day.year("05/16/2008") > mdy $month [1] 5 $day [1] 16 $year [1] 2008 > mdy$month [1] 5 On Mon, Jun 22, 2009 at 11:36 AM, Jack Luo<jluo.rh...@gmail.com> wrote: > Hi, > > I have a simple question, suppose I have the date "05/16/2008", what would > be the command to get the month, day and year? > > Thanks, > > -Jack > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.