title: CAKE PHP change date format
body: <p>I have the following code which displays all calls details, I want the date format of "call_date" to change to "dd-mm-yyyy" and I have got the following code in my calls/index.ctp:</p>
  
  <pre><code>&lt;div class="callsIndex"&gt;
      &lt;h2&gt;&lt;?php echo __('Call Details'); ?&gt;   &lt;/h2&gt;
      &lt;div class="bottomButtonnew"&gt;&lt;?php echo $this-&gt;Html-&gt;link(__('Add Calls'), array('action' =&gt; 'add')); ?&gt;&lt;/div&gt;
  
  
      &lt;table cellpadding="0" cellspacing="0"&gt;
          &lt;tr&gt;
  
              &lt;th&gt;&lt;?php echo $this-&gt;Paginator-&gt;sort('Call Date'); ?&gt;&lt;/th&gt;
              &lt;th&gt;&lt;?php echo $this-&gt;Paginator-&gt;sort('Call Time'); ?&gt;&lt;/th&gt;
              &lt;th&gt;&lt;?php echo $this-&gt;Paginator-&gt;sort('Comments'); ?&gt;&lt;/th&gt;
              &lt;th&gt;&lt;?php echo $this-&gt;Paginator-&gt;sort('Next Call Date'); ?&gt;&lt;/th&gt;
              &lt;th&gt;&lt;?php echo $this-&gt;Paginator-&gt;sort('Customer Name'); ?&gt;&lt;/th&gt;
              &lt;th&gt;&lt;?php echo $this-&gt;Paginator-&gt;sort('Company Name'); ?&gt;&lt;/th&gt;
              &lt;th&gt;&lt;?php echo $this-&gt;Paginator-&gt;sort('Employee Name'); ?&gt;&lt;/th&gt;
              &lt;th class="actions"&gt;&lt;?php echo __(''); ?&gt;&lt;/th&gt;
          &lt;/tr&gt;
          &lt;?php foreach ($calls as $call): ?&gt;
              &lt;tr&gt;
  
                  &lt;td&gt;&lt;?php echo h($call['Call']['call_date']); ?&gt;&amp;nbsp;&lt;/td&gt;
                  &lt;td&gt;&lt;?php echo h($call['Call']['call_time']); ?&gt;&amp;nbsp;&lt;/td&gt;
                  &lt;td&gt;&lt;?php echo h($call['Call']['comments']); ?&gt;&amp;nbsp;&lt;/td&gt;
                  &lt;td&gt;&lt;?php echo h($call['Call']['next_call_date']); ?&gt;&amp;nbsp;&lt;/td&gt;
                  &lt;td&gt;
                      &lt;?php echo $this-&gt;Html-&gt;link($call['Customers']['customer_name'], array('controller' =&gt; 'customers', 'action' =&gt; 'view', $call['Customers']['id'])); ?&gt;
  
                  &lt;/td&gt;
                  &lt;td&gt;
                      &lt;?php echo $this-&gt;Html-&gt;link($call['Companies']['company_name'], array('controller' =&gt; 'companies', 'action' =&gt; 'view', $call['Companies']['id'])); ?&gt;
                  &lt;/td&gt;
                  &lt;td&gt;
                      &lt;?php echo $this-&gt;Html-&gt;link($call['Employees']['employee_name'], array('controller' =&gt; 'employees', 'action' =&gt; 'view', $call['Employees']['id'])); ?&gt;
                  &lt;/td&gt;
                  &lt;td class="actions"&gt;
  
  
                      &lt;?php echo $this-&gt;Html-&gt;link(__('View'), array('action' =&gt; 'view', $call['Call']['id'])); ?&gt;
                  &lt;/td&gt;
              &lt;/tr&gt;
          &lt;?php endforeach; ?&gt;
      &lt;/table&gt;
      &lt;p&gt;
          &lt;?php
          echo $this-&gt;Paginator-&gt;counter(array(
              'format' =&gt; __('Page {:page} of {:pages}, showing {:current} records out of {:count} total')
          ));
          ?&gt;  &lt;/p&gt;
      &lt;div class="paging"&gt;
          &lt;?php
          echo $this-&gt;Paginator-&gt;prev('&lt; ' . __('previous'), array(), null, array('class' =&gt; 'prev disabled'));
          echo $this-&gt;Paginator-&gt;numbers(array('separator' =&gt; ''));
          echo $this-&gt;Paginator-&gt;next(__('next') . ' &gt;', array(), null, array('class' =&gt; 'next disabled'));
          ?&gt;
      &lt;/div&gt;
      &lt;br&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>How can I change the date format in "call_date" to dd-mm-yyyy? can someone help?</p>