http://book.cakephp.org/#!/view/1471/Formatting
public $helpers = array('Time');
<?php echo $this->Time->format('m-d-Y', $campaign['Campaign']['created']); ?>
Andras Kende
http://www.kende.com
On Feb 3, 2011, at 12:36 AM, andy_the ultimate baker wrote:
> hi,
> i m working on somthing where i need to display the date and time, i m
> taking it from the data base but the format differs from the way i
> want to display it,
>
> can any one suggest how to change the format to display on screen the
> way we want even if it is different in database?
>
> currently i showing the date in following format
>
> 2011-02-01 16:10:19
>
> i want to display it as bellow
>
> dd-mm-yyyy
>
> like 02-02-2011
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group at
> http://groups.google.com/group/cake-php
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php