I have a column that has data as such
df <- data.frame(request_time = c("2020-12-31 13:05:00", NULL, "2020-11-14 02:04:01")
I want to split the request_time column to extract just the the date. Hoping to have a new column called request_date.
I was trying to do the following:
df$request_date <- as.Date(df$request_time)
But this returns an error saying the "character string is not in a standard unambioguous format" Im assuming dates due to the NULLS present. How can I get past this?