recovering date-time milliseconds w lubridate

Hey @cawthm! I'm not sure what's going on here (I was able to reproduce your problem), but it's worth noting that the sub-second functions may be deprecated soon.

Depending on your use-case, you might need to find another way around this. For example, to get the number of milliseconds as a number:

seconds(my_time) %>% as.numeric() * 1e3

FWIW, the milliseconds function—should it work properly—actually returns a period expressed in seconds, not milliseconds. I think seconds are the smallest unit, and fractions of a second are actually represented as fractions of a second. What did you want to use the milliseconds for?

4 Likes