Tena koe What do you want to control? You can govern the format used in R using the appropriate R functions. I doubt it would be useful to have dates read from Excel depend on the format set for displaying those dates in Excel.
HTH .... Peter Alspach > -----Original Message----- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of Hongying Li > Sent: Friday, 30 July 2010 5:33 a.m. > To: r-help@r-project.org > Subject: [R] reading dates in Excel into R > > > I am reading dates in Excel2007 into R. > > Here are the functions I used: > > library(RODBC) > channel<-odbcConnectExcel2007("myfile.xlsx") > tmp<-sqlFetch(channel,"1",as.is=T) > > > The dates in myfile.xlsx are all in this format: mm/dd/yyyy. But when I > read it to R, some columns look like "yyyy-mm-dd 00:00:00", some > columns look like "yyyy-mm-dd", and some columns are numbers. I do not > know how I can control this. > > > > Any help? Thanks! > > > > _________________________________________________________________ > Hotmail is redefining busy with tools for the New Busy. Get more from > your inbox. > > N:WL:en-US:WM_HMP:042010_2 > [[alternative HTML version deleted]] > > ______________________________________________ > 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. ______________________________________________ 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.