Maybe there is some built-in assumption about dating and when to change to the new century. It seems to kick-in at 1968
as.Date("25/04/69", "%d/%m/%y") as.Date("25/04/68", "%d/%m/%y") as.Date("25/04/60", "%d/%m/%y") John Kane Kingston ON Canada > -----Original Message----- > From: frans.marcelis...@digipsy.nl > Sent: Fri, 30 Aug 2013 15:12:40 +0200 > To: r-help@r-project.org > Subject: [R] strange conversion char to date > > Hi R-friends, > Can anyone explain the following strange behavior to me? >> as.Date( "4/25/71","%m/%d/%y") > [1] "1971-04-25" >> as.Date( "4/25/62","%m/%d/%y") > [1] "2062-04-25" > > so 71 is converted to 1971, while 62 is converted to 2062? Does anyone > know > why? And is there a simple way to specify the date? > (does works the same way in R 2.01 as well as in 1.9) > > ------------------- > dr F.H.G. (Frans) Marcelissen > DigiPsy (www.DigiPsy.nl <http://www.digipsy.nl/>) > Pomperschans 26 > 5595 AV Leende > tel: 040 2065030/06 2325 06 53 > skype adres: frans.marcelissen > email: frans.marcelis...@digipsy.nl > > [[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. ____________________________________________________________ GET FREE SMILEYS FOR YOUR IM & EMAIL - Learn more at http://www.inbox.com/smileys Works with AIM®, MSN® Messenger, Yahoo!® Messenger, ICQ®, Google Talk™ and most webmails ______________________________________________ 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.