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 <[email protected]> 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 [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

Reply via email to