Hard to tell for sure without a reproducible example, but very likely the problems is that read.csv() is reading SalesDate as factors instead of dates, use read_csv() instead, if you need more specific help, please provide a proper REPRoducible EXample (reprex)
This error means that you apply the function weekdays on a variable of type factor but this function is made to work on Dates. see ?weekdays
you need to correctly prepare your data I guess
Please share some sample dates from your data. That should help us understand and troubleshoot.
From what I can make out from the error, you need to first convert the date from factor to a date time object. We can help you if you can share some sample dates from your dataset.