Hi everyone, I have another fairly simple question. I want to take the earliest of two dates from these two date columns. I've tried converting the dates to numbers and just get a vector full of NA's. I've also tried using the chron function to compare the two and have been unsuccessful. I then tried to use:temp.2 <- as.POSIXct(strptime(temp, '%d/%m/%Y')) where temp is character vector of one of the date columns this did not work either. I'm not sure what to do now. date_1 date_2 2005-11-25 <NA> 2007-10-23 <NA> <NA> 1999-12-13 2006-01-25 <NA> 2006-06-12 <NA> 2005-08-08 <NA> 2007-12-12 <NA> 2008-04-29 <NA> 2005-03-28 <NA> 2004-11-18 2000-11-02 2006-03-16 <NA> 2007-01-17 <NA>
Thanks for your help, Natalie -- View this message in context: http://n4.nabble.com/Comparing-two-date-columns-tp1563776p1563776.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.