Dear R Users, given that:> AggDateTime[960:962][1] "2011-08-25 23:59:00 BST" "2011-08-26 00:00:00 BST" [3] "2011-08-26 00:01:00 BST"> unlist(strsplit(as.character(AggDateTime[960])," ", fixed=TRUE))[1] "2011-08-25" "23:59:00"> unlist(strsplit(as.character(AggDateTime[962])," ", fixed=TRUE))[1] "2011-08-26" "00:01:00" Why no time here?> unlist(strsplit(as.character(AggDateTime[961])," ", fixed=TRUE))[1] "2011-08-26" best, robert -- View this message in context: http://r.789695.n4.nabble.com/split-date-nad-time-tp4164191p4164191.html Sent from the R help mailing list archive at Nabble.com.
On Dec 6, 2011, at 5:38 AM, threshold wrote:> Dear R Users, > > given that: > >> AggDateTime[960:962] > [1] "2011-08-25 23:59:00 BST" "2011-08-26 00:00:00 BST" > [3] "2011-08-26 00:01:00 BST" > > >> unlist(strsplit(as.character(AggDateTime[960])," ", fixed=TRUE)) > [1] "2011-08-25" "23:59:00" >> unlist(strsplit(as.character(AggDateTime[962])," ", fixed=TRUE)) > [1] "2011-08-26" "00:01:00" > > Why no time here? >> unlist(strsplit(as.character(AggDateTime[961])," ", fixed=TRUE)) > [1] "2011-08-26"The real question should be: why you didn't post the results of : dput(AggDateTime[960:962]) -- David Winsemius, MD West Hartford, CT
ok,> dput(AggDateTime[960:962])structure(c(1314313140L, 1314313200L, 1314313260L), class = c("POSIXct", "POSIXt"), tzone = "") -- View this message in context: http://r.789695.n4.nabble.com/split-date-nad-time-tp4164191p4165378.html Sent from the R help mailing list archive at Nabble.com.