I'm new to SQL, learning the basics. I searched, but did not find the exact answer I needed that would work.
I have a table that shows customers who have purchased products and the datetime
they were purchased. The column is called SaleDate
. The format (for example) of the datetime
looks like this:
2015-08-21 00:00:00.000
2014-03-17 00:00:00.000
I need to use a query to only show the products purchased during December of 2015. I don't think the SELECT
or FROM
statements are relevant to my question. Here are the two WHERE
clauses I tried. Neither of these worked.
WHERE SaleDate = '2015-12%'
WHERE SaleDate = '%Dec-2015%'