From 9eab011cff0d2022256d33290eda559afe7d4da8 Mon Sep 17 00:00:00 2001 From: roberto Date: Thu, 12 Jul 2012 12:02:29 +0000 Subject: [PATCH] Se arregla validacion de fecha git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_IntranetNueva/trunk@63 77cfc57b-8ef4-1849-9df6-4a38aa5da120 --- www/protected/models/Candidato.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/www/protected/models/Candidato.php b/www/protected/models/Candidato.php index f242788..55b83a0 100644 --- a/www/protected/models/Candidato.php +++ b/www/protected/models/Candidato.php @@ -305,8 +305,10 @@ class Candidato extends CActiveRecord { //PHP dates are displayed as dd/mm/yyyy //MYSQL dates are stored as yyyy-mm-dd + if ($this->fecha_nacimiento != '') { $unafecha = DateTime::createFromFormat('d/m/Y', $this->fecha_nacimiento); $this->fecha_nacimiento = $unafecha->format('Y-m-d'); + } parent::beforeSave(); return true;