title: Oracle: convert varchar2 to the datetime format 'yyyy-mm-ddThh:mm:ssZ'
body: <p>I have a date in a varchar2 with format 'ddmmyyyy' and I want to convert it to the format 'yyyy-mm-ddThh:mm:ssZ' in which the final variable has a date time format.</p>
  
  <p>For instance, I have the following varchar2 variable <code>variable1</code>:</p>
  
  <p><code>variable1 := '11092016'</code>;</p>
  
  <p>and I want the final result be:</p>
  
  <p><code>variable2:='2016-09-11T00:00:00Z'</code></p>
  
  <p>where <code>variable2</code> is not a varchar2 but has other any date time format.</p>
  
  <p>Can anyone help me, please?</p>