title: last_day in PostgreSQL
body: <p>The oracle <code>last_day</code> function return the last day of the month.
  example:</p>
  
  <pre><code>nls_date_format='YYYY-MM-DD H24:MI:SS'
  select last_day(sysdate) from dual;
  LAST_DAY(SYSDATE)
  -------------------
  2014-06-30 15:45:43
  </code></pre>
  
  <p>oracle return the time value as well.</p>
  
  <p>I have tried below sql in PostgreSQL which return the last day of month but time value is "00:00:00". </p>
  
  <pre><code>select (date_trunc('month', now()) + interval '1 month -1 day')::timestamp(0);
           ?column?          
  ---------------------------
   2014-06-30 00:00:00
  (1 row)
  </code></pre>
  
  <p>the sql return the date correctly but I want date and time like oracle.</p>