This is my sample data 2000/01/01 2000/01/01 2000/02/01 2000/10/01 2000/19/01 2000/20/01 2000/21/01 2000/22/01 2000/23/01 2000/25/01 2000/26/01 2000/27/01 2000/28/01 2000/29/01
Tried using levels function but got the following error . Error in levels(a$date) <- gsub("/", "-", levels(a$date)) : attempt to set an attribute on NULL Thanks. -- View this message in context: http://n4.nabble.com/Replace-with-in-date-tp1911391p1934333.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.