title: SAPUI5: Output formatted date
body: <p>I´ve developed an SAPUI5 application with an XML-View.</p>
  
  <p>Now I want to format a date correctly.</p>
  
  <p>I tried it the following way:</p>
  
  
  
  <pre class="lang-xml prettyprint-override"><code> &lt;Text text="{  
     path: 'model&gt;LastCommDate',  
     type: 'sap.ui.model.type.Date',  
     formatOptions: {  
       pattern: 'yyyy/MM/dd'  
     }
   }" /&gt;
  </code></pre>
  
  <p>Error message:
  <code>datajs.js:17 Uncaught TypeError: j.getTime is not a function</code></p>
  
  <p>Without the <code>formatOptions</code> and <code>type</code> I get the unformatted output.</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;Text text="{  
    path: 'model&gt;LastCommDate'
  }" /&gt;
  </code></pre>
  
  <p>Output: <code>2015-06-16T00:00:00</code></p>
  
  <p>EDIT:</p>
  
  <p>Same question for <code>Time</code>:
  How should look the patterns for a time-object? </p>
  
  <p>type: <code>sap.ui.model.type.Time</code></p>
  
  <p>Unformated output: <code>PT19H21M29S</code></p>