title: How to get postgres sql timestamp in 'DD-Mon-YYYY' format?
body: <p>My Datestyle:</p>
  
  <pre><code>=&gt; show datestyle;
      DateStyle
     -----------
       ISO, YMD
  </code></pre>
  
  <p>Its showing format as:</p>
  
  <pre><code>=&gt; select now()::DATE;
  now
  ------------
   2013-10-17
  </code></pre>
  
  <p>But I want the output:</p>
  
  <pre><code>now
  ------------
   17-Oct-2013
  </code></pre>
  
  <p>This can be done using <code>TO_CHAR(timestamp,'MON-YY')</code> but its datatype changes to character string I want the datatype as timestamp only</p>