In my dataset I have a column with the date and a column with the time:
YYMMDD TIME
19861226 74751.00
19871214 204951.05
19891201 200914.35
19910215 21116.54
19910425 102631.58
19910808 40114.65
When I want to bind these two into one variable with df$datetime <- as.POSIXct(paste(df$YYMMDD,df$TIME),format='%Y%m%d %H%M%S')
, I get NA values for the 1st, 4th and 6th row. This is probably due to the missing zero's. The original excel-file did include the zero's.
How do I solve this?