SELECT created_date FROM oining_Details WHERE year(JoinedDate) = 2012 and month(JoinedDate) between 3 and 6
SELECT * FROM [tableName] WHERE StartDate <= '03-26-2012' AND EndDate >= '06-12-2012'
SELECT * FROM table WHERE @date >= startdate AND @date <= enddate
SELECT * FROM [table] WHERE date BETWEEN startdate AND enddate.
SELECT * FROM Emp WHERE -- Compare year DATEPART(yyyy, JoinedDate) = 2012 -- compare month AND (BETWEEN DATEPART(mm, JoinedDate) = 03 AND DATEPART(mm, JoinedDate) = 06)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)