Marcelo, I can't see how Set::format will work. I want to change the string '2009-09-06' to '6 Sep'.
The Set::format utility basically uses the sprintf function to rearrange the keys into a string. Or am I missing something? Thanks On Sep 13, 12:11 pm, Marcelo Andrade <[email protected]> wrote: > On Fri, Sep 11, 2009 at 11:50 AM, gedm <[email protected]> wrote: > > > I have an array of data ($rounds) retrieved from a find('list') > > command which looks like: > > [1] => 2009-09-06 > > [2] => 2009-09-13 > > [3] => 2009-09-20 > > [4] => 2009-09-27 > > [5] => 2009-10-04 > > [6] => 2009-10-11 > > [7] => 2009-10-18 > > [8] => 2009-10-25 > > [9] => 2009-11-01 > > [10] => 2009-11-08 > > [11] => 2009-11-15 > > > The dates populate a Select form field using the view code > > $form->input('round_id'); > > > I would like to reformat the dates in the Select field to d-mmm > > > How do I reformat the values in the Select form field? > > Set::format is all you need! :-P > > http://book.cakephp.org/view/672/format > > Best regards. > > -- > MARCELO DE F. ANDRADE > Belem, PA, Amazonia, Brazil > Linux User #221105 > > http://mfandrade.wordpress.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
