ID subject Date1 Date2

ID Resultdate

M001 1/1/2017
M001 2/1/2017
M001 3/1/2017
so on until 20/1/2017
M002 2/2/2017
M002 3/2/2017
so on until 20/02/2017
E001 3/1/2017
E001 4/1/2017
so on until 25/01/2017
E002 3/1/2017
E002 4/1/2017
so on until 20/02/2017

SELECT
S.ID
,DATEADD(DAY,v.number*6,S.Date1) AS ResultDate
FROM @tv_Source AS S
INNER JOIN (SELECT number FROM master..spt_values WHERE type ='p' AND number <=356) AS V
ON S.Date2>= DATEADD(DAY,v.number*6,S.Date1)

SELECTS.ID
,DATEADD(DAY,v.number6,S.Date1) AS ResultDate
FROM @tv_Source AS S
INNER JOIN (SELECT number FROM master..spt_values WHERE type ='p' AND number <=356) AS V
ON S.Date2>= DATEADD(DAY,v.number6,S.Date1)