title: Not able to convert timestamp to char or date in oracle sql
body: <p>I need to convert timestamp value(19-01-21 09:15:00.000000 PM) to date format('YYYY/MM/DD HH24:MI:SS') . I'm trying to do it using to_char function (to convert it to varchar and use it in TO_DATE function). I'm getting below error in to_char function. Is this the feasible way or please suggest if anything better works</p>
  <pre class="lang-sql prettyprint-override"><code>select TO_CHAR('19-01-21 09:15:00.000000 PM','DD-MM-YY HH:MI:SSxFF AM') from dual; 
  </code></pre>
  <pre class="lang-sql prettyprint-override"><code>select TO_DATE(TO_CHAR('19-01-21 09:15:00.000000 PM','DD-MM-YYYY HH:MI:SSxFF AM'),'YYYY/MM/DD HH24:MI:SS'  ) from dual;
  </code></pre>
  <p>I'm getting below error:</p>
  <pre><code>ORA-01722: invalid number
  01722. 00000 -  &quot;invalid number&quot;
  *Cause:    The specified number was invalid.
  *Action:   Specify a valid number.
  </code></pre>