Hi there,
I'm very new to r and have been struggling to see what is wrong with my code below which I shamlessly borrowed from another post. Im trying to split the started_at (2020-05-23 21:16:11) column into start_date and start_time columns. time is working ok but my date code is just returning NA values. Can anyone see whats wrong?
Many Thanks!
tripdata_2020to2021 %>%
separate(started_at, into = c("start_date", "start_time"), sep = " ", remove = FALSE) %>%
mutate(start_date = lubridate::as_date(start_date, format = "%y/%m/%d"), start_time = hms::as_hms(str_c(start_time, "00")))