title: start/end date and time in oracle sql query
body: <p>I need a query output like the below table; 
  This is a primary entry to a table and these records will be modified by a third party program which I have no control. Can anyone suggest a good sample?</p>
  
  <pre>
  ID | DATEIN              | DATEOUT            | STATUS
   1   02.02.2014 00:00:00   02.02.2014 23:59:59     1
   2   03.02.2014 00:00:00   03.02.2014 23:59:59     0
  </pre>
  
  <p>I tried </p>
  
  <pre><code>SELECT To_Char(To_Date(SYSDATE), 'dd-MM-yyyy hh:mm:ss PM'), 
         To_Char(date_add(To_Date(SYSDATE +1), INTERVAL -1 SECOND), 'dd-MM-yyyy hh:mm:ss PM') 
  FROM dual 
  </code></pre>
  
  <p>but this query throws an error <code>ORA-00907: missing right parenthesis</code>.</p>