select convert(varchar(10), dateadd(day, number - 1, '2015-01-01'), 120) as taskDate
from master.dbo.spt_values WHERE type='P' AND number <= datediff(day, '2010-01-01', '2020-02-01') + 1
AND number>0
select convert(varchar(10), dateadd(day, number - 1, '2015-01-01'), 120) as taskDate
from master.dbo.spt_values WHERE type='P' AND number <= datediff(day, '2010-01-01', '2020-02-01') + 1
AND number>0