Lubridate as_date

It's hard to know for sure without a REPRoducible EXample (reprex) but maybe your problem is with your date format, the default is %Y-%m-%d if your date column has a different format, then you need to specify it with the format parameter e.g.

as_date(data$column, format = '%m-%d-%Y') 

If you need more specific help, please provide a reprex. A reprex makes it much easier for others to understand your issue and figure out how to help.

If you've never heard of a reprex before, you might want to start by reading this FAQ:

1 Like