Usage of weekdays

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)