title: Convert YYYY-MM-DD HH24:MI:SS.F to oracle date format while insert
body: <p>We stored the date as <code>VARCHAR2</code> in our database table</p>
  
  <ul>
  <li>REGDATE - <code>VARCHAR2</code>, Format <code>YYYY-MM-DD hh24:mi:ss.f</code></li>
  </ul>
  
  <p>Sample data:</p>
  
  <pre><code>2018-01-31 23:47:35.0
  2018-01-01 00:00:48.0
  2018-01-01 06:54:36.0
  </code></pre>
  
  <p>I'm trying to insert this data into a new table <code>TABLEB</code> with the correct <code>DATE</code> format. I tried a few solutions like below one's and i usually get <code>ORA-01821: date format not recognized</code></p>
  
  <pre><code>SELECT 
      TO_DATE(REGDATE, 'YYYY-MM-DD HH24:MI:SS.F') 
  FROM 
      TABLEA 
  WHERE 
      REGDATE LIKE '2018-03-16%'
  </code></pre>
  
  <p>Can someone please assist me?</p>