title: SQL server - Select all items with a date on the previous month
body: <p>I have a table in my SQL Server database called "<strong>items</strong>" which has a column called "<strong>dateFinished</strong>".</p>
  
  <p>I have a script that will run on the 1st day of each month which needs to select all items that finished in the previous month.</p>
  
  <p>So, for example, on the 1st February it will need to select all items where the dateFinished is greater than or equal to 00:00 on the 1st of January and less than 00:00 on 1st February.</p>
  
  <p>it also needs to work across new years (e.g. DEC - JAN).</p>
  
  <p>Any ideas?</p>