title: RedShift to_char format not giving desired results
body: <p>I need to convert my timestamps to the following format <strong>YYYY-MM-DDTHH24:MI:SS.0</strong>. Please note the 'T' in the middle. For example 2014-09-04T13:05:10.0.</p>
  
  <p>I tried the following:</p>
  
  <pre><code>select to_char(timestamp,'YYYY-MM-DDTHH24:MI:SS.0') from table;
  </code></pre>
  
  <p>However, RedShift is interpreting the 'TH' as an ordinal number suffix (<a href="http://docs.aws.amazon.com/redshift/latest/dg/r_Numeric_formating.html" rel="nofollow">http://docs.aws.amazon.com/redshift/latest/dg/r_Numeric_formating.html</a>). Therefore, I'm getting results like 2014-03-23RDH24:26:36.0. </p>
  
  <p>Therefore, I added a space after the 'T' and tried trimming the space out.</p>
  
  <pre><code>select trim(' ' FROM to_char(timestamp,'YYYY-MM-DDT HH24:MI:SS.0')) from table;
  </code></pre>
  
  <p>However, the trim did not actually remove the space. My results were like 2014-03-23T 07:26:36.0. </p>
  
  <p>I also tried escaping by using the backslash, but that didn't work either.</p>
  
  <p>How do I achieve the desired format without spaces?</p>