[R] Date Time Objects

dpender d.pender at civil.gla.ac.uk
Wed Oct 13 13:51:51 CEST 2010


I am trying to convert an array from numeric values back to date and time
format.  The code I have used is as follows;

for (i in 0:(length(DateTime3)-1))	{
	DateTime3[i] <- (strptime(start, "%m/%d/%Y %H:%M")+ i*interval)

where start <- [1] "1/1/1981 00:00"

However the created array (DateTime3) contains [1,] 347156400 347157600
347158800 347160000 347161200 347162400 347163600   NA

Does anyone know how I can change DateTime 3 to the same format as start?

Thanks,

Doug

-- 
View this message in context: http://r.789695.n4.nabble.com/Date-Time-Objects-tp2993524p2993524.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list