The one checked was so close to what I needed. Had to make a few changes. 1st I needed more than a month (6 years). Then I need to add the OPTION line at the bottom. This allowed me to join the sales date on this CTE.
declare @mindate datetime
declare @maxdate datetime
set @mindate = '2019-01-01' set @maxdate = '2022-06-17'
; WITH AllDateDOW AS (
SELECT DATEADD(day ,-(DAY(@mindate)-1),@mindate) as AllDATE,
DATENAME(dw, DATEADD(day, -(DAY(@mindate) - 1), @mindate)) as DOWDAY
UNION ALL
SELECT DATEADD(day, 1, AllDATE),
DATENAME(dw, DATEADD(dw, 1, AllDATE))
FROM AllDateDOW
WHERE DATEADD(day, 1, AllDATE) <= @maxdate
)
-- SELECT * FROM AllDateDOW
OPTION (MAXRECURSION 2190) -- This needs to be after the Order By. 2190=6 Years --