0

I have a dataframe with date in character format. I want to convert date into date format. When i try this:

data$date<-as_date(data$date, tz = NULL, format = NULL) 

It converts dataframe into list and also date still remains in character format. what i am doing wrong here?

Thanks

  • It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. – MrFlick Nov 15 '22 at 14:07
  • 1
    There's no reason to explicitly set the arguments to their default values. `tz = NULL` is the default, you you writing `tz = NULL` does nothing. But maybe you need to specify the format. `as_date("2020/12/24")` works fine. `as_date("The 24th day of December in the year 2020")` does not. What does your input look like? – Gregor Thomas Nov 15 '22 at 14:11

0 Answers0