My favorite package for working with dates is 'lubridate'. I don't know how new you are so I'll just write what I would have liked to know when I started with R. Code below:
To install lubridate onto your machine so you can work with it, run:
install.packages('lubridate')
library(lubridate)
There are several functions to coerce a vector of character dates to datetime format.
If your dates look like this '2019-04-04', use the function 'ymd()'.
ymd('2019-04-04')
If your dates are in the format of month-day-year, use 'mdy()', etc.
Here's the 'lubridate' cheat sheet that offers an overview of its date functions: