Hello, SMALL, reproducible examples...
Anyway, it's not that difficult. Try this d.of.w <- as.integer(format(as.Date(test1$Date, format="%d/%m/%Y"), "%w")) str(d.of.w) head(d.of.w) Note that the format '%w' gives days in 0-6, where Sunday == 0. See ?strftime. Your Friday is therefore 5. (Or use d.of.w <- d.of.w + 1) Hope this helps, Rui Barradas -- View this message in context: http://r.789695.n4.nabble.com/difficulty-in-Formatting-time-series-data-tp4578461p4578655.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.