I think this example will show you how to perform the individual steps and then you can adapt it as needed
library(dplyr)
library(readxl)
library(hms)
# This part is only for loading the sample data, use your own file instead.
link <- "https://github.com/derek-l-thomas/time.data/raw/main/derek_sample.xlsx"
download.file(link, "driver_data.xlsx")
driver_data <- readxl::read_excel("driver_data.xlsx")
driver_data %>%
mutate(across(contains("time"), as_hms),
across(contains("date"), as.Date),
p2_time_stamp = as.POSIXct(paste(p2_request_date, p2_request_time))) %>%
select(p2_time_stamp, everything())
#> # A tibble: 90 x 9
#> p2_time_stamp p2_request_date p2_request_time p3_begin_date
#> <dttm> <date> <time> <date>
#> 1 2021-03-03 12:10:33 2021-03-03 12:10:33 2021-03-03
#> 2 2021-03-03 11:29:21 2021-03-03 11:29:21 2021-03-03
#> 3 2021-03-03 10:44:26 2021-03-03 10:44:26 2021-03-03
#> 4 2021-03-03 10:08:28 2021-03-03 10:08:28 2021-03-03
#> 5 2021-03-03 09:42:02 2021-03-03 09:42:02 2021-03-03
#> 6 2021-03-03 09:32:20 2021-03-03 09:32:20 2021-03-03
#> 7 2021-03-03 08:45:00 2021-03-03 08:45:00 2021-03-03
#> 8 2021-03-03 07:30:00 2021-03-03 07:30:00 2021-03-03
#> 9 2021-03-03 06:22:22 2021-03-03 06:22:22 2021-03-03
#> 10 2021-03-02 15:11:13 2021-03-02 15:11:13 2021-03-02
#> # … with 80 more rows, and 5 more variables: p3_begin_time <time>,
#> # p3_end_date <date>, p3_end_time <time>, trip <chr>,
#> # gross_orig_driver_pay <dbl>
Created on 2021-04-26 by the reprex package (v2.0.0)