I am looking to write a SQL query and use a dynamic date. I want the SQL to ALWAYS use 1/1 to 12/31 of the prior calendar year. So, if it is run at any point in 2016, it will return all results from 1/1/15 to 12/31/15. If I run it in 2017, the dates will automatically change to 1/1/16 to 12/31/2016. Is this possible?
↧