title: How do I set date format to `YYYY-MM-DDTHH24:MI:SS` in PostgreSQL
body: <p>I can use the <code>to_char</code> function to convert it to <code>YYYY-MM-DD HH24:MI:SS</code> and it comes out correctly but I want the space between the <code>DD</code> and `HH to be replaced by the letter 'T'.</p>
  
  <p>If I use <code>YYYY-MM-DDTHH24:MI:SS</code> then I get, for example, <code>2014-06-09THH24:58:30</code>.</p>
  
  <p>How can I get the format I need?</p>