title: Date conversion from regexp output data -- ORA-01841: (full) year must be between -4713 and +9999, and not be 0
body: <p>I am trying to convert a value to the normal date format. But i am receiving the error ORA-01841: (full) year must be between -4713 and +9999, and not be 0   . I have researched the answers for a similar question in this website but that doesn't address my issue.</p>
  
  <pre><code>-- How the data looks like 
  select REPLACE(REGEXP_SUBSTR(data_detail, '([^|]*)([$|]|$)', 1, 5), '|', '') from land.LAND_DATA;
  </code></pre>
  
  <p>Output</p>
  
  <p>2017-11-16T04:45:05.000Z </p>
  
  <p>2017-11-16T04:46:04.000Z</p>
  
  <p>When i am trying to convert the above mentioned output in to an appropriate date format i am receiving the error. What mistake am i doing here </p>
  
  <pre><code>select
  TO_DATE(
  TO_CHAR(
  TO_TIMESTAMP(
       REPLACE(REGEXP_SUBSTR(data_detail, '([^|]*)([$|]|$)', 1, 5), '|', ''), 
  'YYYY-MM-DD"T"HH24:MI:SS.ff3"Z"'),'MM/DD/YYYY HH24:MI:SS'),
          'MM/DD/YYYY HH24:MI:SS')
  from land.LAND_DATA;
  </code></pre>