Try this: sapply(0::(length(DateTime3)-1), function(i)format(strptime(start, "%m/%d/%Y %H:%M") + i * interval, "%Y-%m-%d %H:%M:%S"))
On Wed, Oct 13, 2010 at 10:16 AM, dpender <d.pen...@civil.gla.ac.uk> wrote: > > Thanks Henrique, > > Do you have any idea why the first entry doesn't have the time as the start > specified is "1/1/1981 00:00"? > > Is it something to do with being at midnight? > > Doug > -- > View this message in context: > http://r.789695.n4.nabble.com/Date-Time-Objects-tp2993524p2993640.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. > -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O [[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.