I have a query when I run like this
select emp_name, dt_of_join 
from emp_mst 
where dt_of_join = '2015-09-14'
I get one record from the table.
But when I try to run in dynamically like below
SELECT emp_name, Dt_Of_Join 
FROM emp_mst 
WHERE Dt_Of_Join =  DATEADD(month, -6, GETDATE())
it doesn't return any records. WHY ???
I am using SQL Server 2008.