Converting data format
You can simply use as.Date, see below.

dates.text &lt;- c("2020-02-24T18:00:00", "2020-02-25T18:00:00", "2020-02-26T18:00:00",
                "2020-02-27T18:00:00", "2020-02-28T18:00:00", "2020-02-29T18:00:00")
dates.text
# [1] "2020-02-24T18:00:00" "2020-02-25T18:00:00" "2020-02-26T18:00:00" "2020-02-27T18:00:00"
# [5] "2020-02-28T18:00:00" "2020-02-29T18:00:00"

dates.dates &lt;- as.Date(dates.text)
dates.dates
# [1] "2020-02-24" "2020-02-25" "2020-02-26" "2020-02-27" "2020-02-28" "2020-02-29"