title: to_char function issue with date passing in the format of 'dd-mon-yyyy'
body: <p>My query is  </p>
  
  <p><code>select TO_CHAR('03-JAN-2013', 'D') from dual;</code></p>
  
  <p>but an error occured as </p>
  
  <pre><code>ORA-01722: invalid number
  01722. 00000 -  "invalid number"
  *Cause:    
  *Action:
  </code></pre>
  
  <p>But when query changed as <code>select TO_CHAR(sysdate, 'D') from dual;</code></p>
  
  <p>Result is right answer 5.</p>
  
  <p>I can't understand why it is behaving like this, please help me. </p>
  
  <p>Thanks in advance</p>