Previous 5 Years Data based on a Specific Year I have a table like this:  

ID|Date    |Name|Score  
1 |1/1/2014|Erin|20.2  
2 |6/3/2014|Erin|21.2  
3 |7/2/2015|Emil|34.2    
4 |1/1/2016|Erin|20.2  
5 |2/2/2011|Paul|20.2  
6 |1/1/2012|John|54.2  
7 |1/1/2017|John|54.2  
8 |12/31/2016|Erin|23.2


I want the data back 5 years based on the year I provide.
I am using this:  

select * from tblStdnt where date &gt; DATEADD(Year,DATEDIFF(year,0, '2016')- 5, 0) 


But this gives me data starting from 2017. How do I fix this? any ideas?

It should give me:  


  all data from 2011 to 2016 (the 5 year period, regardless of the month or day) 


UPDATE
DBFiddle link
You only need to use DATEADD




DECLARE @DT date = '20150101';

SELECT DATEADD(year, -5, @DT);
GO



| (No column name)    |
| :------------------ |
| 01/01/2010 00:00:00 |



dbfiddle here

UPDATE

As far as you need all data between two years you can use the next sentence:

DECLARE @DT date = '20160101';

SELECT * 
FROM   tblStdnt 
WHERE  YEAR(date) &gt;= YEAR(@DT) - 5
AND    YEAR(date) &lt;= YEAR(@DT);


According to your sample data:



ID | Date                | Name | Score
-: | :------------------ | :--- | :----
 1 | 01/01/2014 00:00:00 | Erin | 20.20
 2 | 31/03/2014 00:00:00 | Erin | 21.20
 3 | 07/02/2015 00:00:00 | Emil | 22.20
 4 | 31/12/2016 00:00:00 | Erin | 23.20
 5 | 02/02/2011 00:00:00 | Paul | 24.20
 6 | 31/12/2011 00:00:00 | John | 25.20
 7 | 01/01/2012 00:00:00 | John | 26.20
 9 | 01/01/2013 00:00:00 | Emil | 26.20
11 | 01/01/2016 00:00:00 | Erin | 29.20






DECLARE @DT date = '20160101';

SELECT YEAR(@DT) - 5 AS StartDate,
       YEAR(@DT) AS EndDate;
GO



StartDate | EndDate
--------: | ------:
     2011 |    2016



dbfiddle here