title: Converting from Java Timestamp to Oracle Timestamp
body: <p>In my java project I'm trying to create a timestamp that will be stored later in the database (Oracle Database).
  After many trials I found that the timestamp my java code generates is in the following format:</p>
  
  <pre><code>2017-06-20 14:38:12.296
  </code></pre>
  
  <p>and the timestamp format in Oracle is like: </p>
  
  <pre><code>20-JUN-19 02.38.55.059000000 PM
  </code></pre>
  
  <p>Is there a way to convert the java format of timestamp to oracle's format?</p>
  
  <p>My code for creating the timestamp:</p>
  
  <pre><code>Date date = new Date();
  long time = date.getTime();
  Timestamp timeStamp = new Timestamp(time);
  </code></pre>
  
  <p>I have tried so many timestamps conversions but with no use.</p>