title: ORA-01830 Error - converting a string to a date object
body: <p>I need to convert a string to a date object in oracle. Since all this is running inside a shell-script via the sql-loader (sqlldr) I can neither modify nor view the code. The only parameter I can set is the format-string for the conversion process.</p>
  
  <p>The input string does always look the same: <strong>'Mar 11 2015  7:37:53:060PM'</strong></p>
  
  <ol>
  <li><p>Try: I created a format like this: <strong>'Mon dd YYYY HH:mi:ss:ff3AM'</strong>, but I couldn't run it, because I ran into this error message: <strong><em>"kgepop: no error frame to pop to for error 1821" (I assume this is realted to ORA-01821: date format not recognized)</em></strong> I assume this is because of the "ss:ff3AM", since I figured out that obviously the <strong>to_date</strong> function is not able to read milliseconds and AM/PM as an input parameter (please correct me if I am wrong, I am not 100% sure about this).</p></li>
  <li><p>Try: I created a format like this: <strong>'Mon dd YYYY HH:mi:ss'</strong> and I hoped he might just cut off the rest of the input string but I ran into the <strong><em>ORA-01830 Error ("date format picture ends before converting entire input string")</em></strong></p></li>
  </ol>
  
  <p>Because of this I assumed, that the script does something like this:</p>
  
  <pre><code>to_date('MAR 11 2015  7:37:53:060PM','Mon dd YYYY HH:mi:ss');
  </code></pre>
  
  <p>Is there a way to tell the to_date method to cut off the last part of the input string via the format-string?</p>
  
  <p>Every help will be appreciated !</p>
  
  <p>EDIT</p>
  
  <p>I unfortunately cannot use the to_timestamp method since I cannot modify the shell scripts functionality. So I have to use the to_date method :(</p>