SELECT CONVERT(VARCHAR(10) , DATEADD(dd , number , '2021-08-25') , 120) AS dtDate INTO #tempDate FROM master..spt_values WHERE type = 'P' AND DATEADD(dd , number , '2021-08-25') <= '2021-08-31'