How do I use strptime or any other functions to parse time stamps with milliseconds in R?
time <- "2010-01-15 13:55:23.975"
print(time)
# [1] "2010-01-15 13:55:23.975"
strptime(time, format="%Y-%m-%d %H:%M:%S.%f")
# [1] NA
strptime(time, format="%Y-%m-%d %H:%M:%S")
# [1] "2010-01-15 13:55:23"`
Courtesy of the
?strptimehelp file (with the example changed to your value):