Dates in R, like dates in any other software package, are tricky to work with. Here’s a nice guide that will help you get started.
Cole Beck. Handling date-times in R. 2012 (August 30). Available at http://biostat.mc.vanderbilt.edu/wiki/pub/Main/ColeBeck/datestimes.pdf.
This page has moved to a new website.