The following is a minor modification of examples in the help for "as.Date":
> x <- c("1jan1960", "2jan1960", "31mar1960", "30jul2006") > z <- as.Date(x, "%d%b%Y") > z< Sys.Date() [1] TRUE TRUE TRUE FALSE How's this? spencer graves Omar Lakkis wrote: > I have a Date variable that I constructed with as.Date() > How ca I compare it to today (<,>,==) ? > > ______________________________________________ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Spencer Graves, PhD Senior Development Engineer PDF Solutions, Inc. 333 West San Carlos Street Suite 700 San Jose, CA 95110, USA [EMAIL PROTECTED] www.pdf.com <http://www.pdf.com> Tel: 408-938-4420 Fax: 408-280-7915 ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html