You're going to have to use the virtualFields model property. Otherwise, it will always place it under a 0 index (even if you specify the virtual field in the find as 'Model.field'). Otherwise, just use a helper or the PHP date() function.
On Jun 11, 7:29 am, John Andersen <j.andersen...@gmail.com> wrote: > As far as I understand from the manual, then CONVERT means that you > cast the date into another type, not converting the date into another > format. > > Use DATE_FORMAT(date, format) instead! > Enjoy, > John > > On Jun 11, 4:26 pm, Jonas <jonas.sand...@gmail.com> wrote: > > > What is the correct way of setting how I want the date returned from a > > database Model->find ? > > > Without anything set it returns [createdate] => Jun 11 2010 > > 03:08:12:283PM which is not the format I'd like. > > > If I modify the column name to i.e. convert(varchar(26), createdate, > > 126) as createdate I get the correct format but the result is returned > > as: > > > [id] => 1, > > [text] => 'Hello', > > [0] => Array( > > [createdate] => '2010...' > > ) > > > which is not what I'd like either. > > > Thanks! > > > /Jonas Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en