title: Get the date one month before and it's always the last day of the month
body: <p>In my db, I have a column, 'Transaction Date' with datetime datatype. For instance, '2011-05-31 00:00:00.000'.
  I would like to create a SQL Query by selecting data with whereby the 'Transaction Date' column date is one month before the @InputDate.</p>
  
  <p>I have tried with...<br>
  <strong>DATEADD(MONTH,-1,@InputDate)</strong> and it returns <strong>'30-May-2011'</strong>, which is not what i want!<br>
  I want the value returns will always be the last day of the month like <strong>'31-May-2011'</strong></p>