Dr. Alireza Zolfaghari wrote: > Hi List, > If I have a date format as: > d <- "2001/1/1" > I can easily convert it to number by using as.Date(d).
Yes. If it means "January the 1st" and not "1st of January", that is... > But if I have d<-"1/1/2001", it does not work. Does anyone know how I can > convert it using pre-written function in R? as.Date has a format= argument. See the Examples section in help(as.Date). > Regards, > Alireza -- O__ ---- Peter Dalgaard Ă˜ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 ______________________________________________ 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.