How to Convert Millisecond to Date in R

Master R

This post is updated based on Luca’s comments.

Sometimes, we receive data where the timestamps are milliseconds and we want to convert them to dates. This is quite easy in R. We just need to use the as.POSIXct() function. Here’s a function wrapper I wrote to make it even easier.

Here’s an example of how to use it: