Skip to content
Prev 266221 / 398502 Next

How to convert 3-digits hours

Wonjae Lee wrote:
d = c('20110101 900', '20110101 1900')
d1=  gsub(" (\\d\\d\\d)$"," 0\\1",d)
strptime(d1,"%Y%m%d %H%M")

Dieter


--
View this message in context: http://r.789695.n4.nabble.com/How-to-convert-3-digits-hours-tp3685436p3686257.html
Sent from the R help mailing list archive at Nabble.com.