On Thu, Feb 3, 2011 at 1:36 AM, andy_the ultimate baker <[email protected]> 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
Aside from the suggestion to use TimeHelper, you can also format them in afterFind() using PHP's date() function. -- 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
