title: Using toChar to output a date in W3C XML Schema xs:dateTime type format
body: <p>I'm trying to convert <code>sysdate</code> using <code>toChar</code> to the following format:
  <code>2006-11-20T17:10:02+01:00</code></p>
  
  <p>From this format:
  <code>16/08/2012 13:40:59</code></p>
  
  <p>Is there a standard way of doing this?</p>
  
  <p>I've tried using the <code>toChar</code> to specific the <code>T</code> part as a string but it doesn't appear to be working.</p>
  
  <p>Thanks in advance</p>
  
  <p>Jezzipin</p>
  
  <p>EDIT:  </p>
  
  <p>I've tried Nicholas' solution however as I mention above, I need to use sysdate. I've used the following select query:</p>
  
  <pre><code>    select to_char(to_timestamp_tz(sysdate-365, 'dd/mm/yyyy hh24:mi:ss'),'yyyy-mm-dd"T"hh24:mi:ss TZH:TZM') from dual;
  </code></pre>
  
  <p>However, this returns:</p>
  
  <pre><code>     0012-08-16T00:00:00 +01:00
  </code></pre>
  
  <p>which is incorrect as it should be 2012-08-16T00:00:00 +01:00</p>