I have a df that contains two column with dates and time and i want to convert them from characters to date and time format. Could anyone help? Thank you
dput(df)
structure(list(start_date = c("2021-03-01 00:00:03", "2021-03-01 00:02:04",
"2021-03-01 00:02:29"), finish_date = c("2021-03-01 00:16:29",
"2021-03-01 00:35:40", "2021-03-01 00:33:14")), row.names = c(NA,
3L), class = "data.frame")
i have tried this but didnt work
as.Date.POSIXct(df$start_date, format="%Y/%m/%dT%H:%M:%S"
as.Date.POSIXct(df$finish_date, format="%Y/%m/%dT%H:%M:%S"