I read a csv file and notice R parse "Date Created" column in 'chr' format. Tried to convert it to 'date' format but failed. Appreciate your advice.
Asked
Active
Viewed 36 times
0

Ong K.S
- 229
- 1
- 4
- 15
-
`f$\`Date Created\` <- as.Date(f$\`Date Created\`)` – Ronak Shah Apr 12 '20 at 10:27
-
@RonakShah I tried as.Date() method with "format" (refer screen with error message) but failed. I wonder is there a way to "turn off"/disable the data type auto conversion when read in csv file with read_csv()? Anyway, TQ for your reply. – Ong K.S Apr 13 '20 at 05:03
-
Ddi you try what I have suggested in my comment above? – Ronak Shah Apr 13 '20 at 05:05
-
I already try as.Date() in different ways, pls refer to the screen shot with error message. – Ong K.S Apr 13 '20 at 06:44
-
alright, i found the cure to this issue. by using ymd_* function in "Lubridate", i can easily convert the character to datetime format. – Ong K.S Apr 17 '20 at 05:32