I wanted to get the date from a column that has both date and time. I applied the function and it worked but i think the function is not applying to the entire dataset because there are some records where i am not getting data rather i am getting an NA value.
I used the following lines of code
`all_trips$Date <- format(as.Date(all_trips$started_at, format = "%d/%m/%Y"), "%Y-%m-%d")
all_trips$Month <- format(as.Date(all_trips$Date),format = "%B")
all_trips$Day <- format(as.Date(all_trips$Date),format = "%A")
all_trips$Year <- format(as.Date(all_trips$Date),format = "%Y")`
And the code worked. Now if you look at the "started_at" column then the date and time both are available in that column but the date is not showing in the columns which i have circled in red color at the bottom.
What is the problem here? And how can i correct this problem?