I'm interested in the answer to this as I am curretly being lazy and
have a convertDate() function in my app_controller and app_model as
follows

function convertDate($input) {
  if ($input) {
    $inputExplode = explode(' ', $input);
    $dateExplode = explode('-', $inputExplode[0]);
    $output = $dateExplode[2]."-".$dateExplode[1]."-".$dateExplode[0];
    $output .= isset($inputExplode[1]) ? " ".$inputExplode[1] : "";
    return $output;
  }
}

I would imagine that you should be using a behaviour with afterFind
and beforeSave methods, but I'm yet to dabble in self-created
behaviours and controllers.

Paul.

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