I have a date column where each date is written without spaces and is in character format.
Date
<chr>
"20130402"
"20130403"
"20130404"
I want to convert these values to date, but it does not work.
I tried the following code to do so:
dataframe %>%
as.Date(Date, origin = "2013-04-02")
However, this resulted in wrong dates, such as "57128-06-03"
.
Can someone help me on how can I fix this?