Hi, If you want to convert reportDate to date format, Try this: dat1<-read.table(text=" reportDate total 1 2010-12-31 170609.2 2 2011-01-03 170778.0 3 2011-01-04 170748.4 4 2011-01-05 170599.5 5 2011-01-06 170335.0 6 2011-01-07 169842.1 ",sep="",header=TRUE,stringsAsFactors=FALSE)
dat1$reportDate<-as.Date(dat1$reportDate,format="%Y-%m-%d") str(dat1) #'data.frame': 6 obs. of 2 variables: # $ reportDate: Date, format: "2010-12-31" "2011-01-03" ... # $ total : num 170609 170778 170748 170600 170335 ... A.K. ----- Original Message ----- From: sf631 <[email protected]> To: [email protected] Cc: Sent: Wednesday, October 17, 2012 3:15 PM Subject: Re: [R] as.xts I'm not the original poster, but I do have the same question. I have pulled in data via RODBC into a data frame, which looks like below and I'm getting the same error message: /("Error in as.POSIXlt.character(x, tz, ...) : character string is not in a standard unambiguous format") / The date format seems pretty straightforward to me so I'm kind of stuck at what to do. BTW, I'm *very* new to R so please forgive some ignorance here reportDate total 1 2010-12-31 170609.2 2 2011-01-03 170778.0 3 2011-01-04 170748.4 4 2011-01-05 170599.5 5 2011-01-06 170335.0 6 2011-01-07 169842.1 -- View this message in context: http://r.789695.n4.nabble.com/as-xts-tp3028280p4646499.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ [email protected] 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. ______________________________________________ [email protected] 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.

