I have a dataframe with a date column using a specific date pattern, where the format is "Sat Aug 15 1992", for example.
I tried to use as.Date("Sat Aug 15 1992","%Y-%m-%d")
but it returns only NA. How can I make R understand my column as a date?
Asked
Active
Viewed 48 times
0

Guilherme do Valle
- 401
- 1
- 4
- 17
2 Answers
1
Check ?strptime
, you can use :
as.Date("Sat Aug 15 1992","%a %b %d %Y")
#[1] "1992-08-15"

Ronak Shah
- 377,200
- 20
- 156
- 213