Creating custom settlement sheet formats

DECLARE @StartDate datetime, @EndDate datetime, @Date datetime, @WDofMonth INT, @CurrentMonth INT. SELECT @StartDate = '1/1/2000' -- Set The start and end date , @EndDate = '1/1/2015'--Non inclusive. Stops on the day before this., @CurrentMonth = 1 --Counter used in loop below. ................
................