Se arregla validacion de fecha
git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_IntranetNueva/trunk@63 77cfc57b-8ef4-1849-9df6-4a38aa5da120
This commit is contained in:
parent
d3abfa60af
commit
9eab011cff
@ -305,8 +305,10 @@ class Candidato extends CActiveRecord
|
|||||||
{
|
{
|
||||||
//PHP dates are displayed as dd/mm/yyyy
|
//PHP dates are displayed as dd/mm/yyyy
|
||||||
//MYSQL dates are stored as yyyy-mm-dd
|
//MYSQL dates are stored as yyyy-mm-dd
|
||||||
|
if ($this->fecha_nacimiento != '') {
|
||||||
$unafecha = DateTime::createFromFormat('d/m/Y', $this->fecha_nacimiento);
|
$unafecha = DateTime::createFromFormat('d/m/Y', $this->fecha_nacimiento);
|
||||||
$this->fecha_nacimiento = $unafecha->format('Y-m-d');
|
$this->fecha_nacimiento = $unafecha->format('Y-m-d');
|
||||||
|
}
|
||||||
|
|
||||||
parent::beforeSave();
|
parent::beforeSave();
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user