Nate Nate - 1 year ago 91
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 Source

You should add this in your queries:

YEAR(DateField) = 2015
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download