I am working on an SQL Query where I need to retrieve all the rows from the SQL table where a DateTime field as the Month and Year supplied no matter what the day and time is
My SQL QUERY is as follows
SELECT * From Table where DateCreated=@selectedDate
Table
Id Product Quantity Price DateCreated
1 abc 20 10 2014-12-04 12:26:44.457
2 xyz 25 15 2014-12-14 12:26:44.457
from the above table it should return all the rows with month 12 and year 2014