Nate Nate - 2 months ago 8
SQL Question

SQL Year Date Query

I am working on a SQL server and I have a list of dates in the format of
2015-03-17 how would I query the database so that only events that occurred in 2015 show up

Answer

You should add this in your queries:

YEAR(DateField) = 2015