On 22-04-2012, at 20:12, Raghuraman Ramachandran wrote: > I tried downloading using as.is and have also provided the dput below. The > date for example is 20/4/2012 and wday gives 2 instead of 6? Thanks for all > your help.
dt <- "20/04/2012" > as.Date(dt) [1] "0020-04-20" > as.Date(dt,format="%d/%m/%Y") [1] "2012-04-20" > weekdays(as.Date(dt,format="%d/%m/%Y")) [1] "Friday" Read the help for as.Date Berend ______________________________________________ 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.