Dear R Studio Community,
I have a data frame that originally has 15 columns.
The column 'started_at' (third column) contains dates and time in the format DD/MM/YYYY HH:MM. I am trying to create a new column called date that uses the date information from the 'started_at' column. To do this, I use the following code chunk:
all_trips$date <- as.Date(all_trips$started_at)
When I run this in R, the column that is created doesn't extract the correct date from the 'started_at' column. for example, instead of returning '27/11/2021' it returns '0027-11-20'. This is shown in the image above where the new column 'date' is all the way at the bottom and the 'started_at' column is the third column from the top.
What can I do to fix this problem?