title: Getting Last Day of Previous Month in Oracle Function
body: <p>I need a function in <code>Oracle</code> like this.</p>
  
  <p>When i giving a parameter a simple date. Then function should getting me last day of the previous month.</p>
  
  <p>Example: </p>
  
  <pre><code>FunctionName(10.02.2011) Result should be 31.01.2011
  
  FunctionName(21.03.2011) Result should be 28.02.2011
  
  FunctionName(31.07.2011) Result should be 30.06.2011 (Even date is last day of month)
  </code></pre>
  
  <p>How can i do that? By the way, i never use <code>Oracle</code> .</p>