i used the function on my php script
but at the time of execution it shows an errorCode:function dateconvert($date,$func){ if ($func == 1){ //insert conversion list($day, $month, $year) = explode('[/.-]', $date); $year=trim($year); $date = "$year-$month-$day"; return $date; } if ($func == 2){ //output conversion list($year, $month, $day) = explode('[-.]', $date); if(trim($date)!=='') $date = "$day/$month/$year"; return $date; } }
: Incorrect date value: '--17-10-1989' for column 'dob' at row 1
the data type of dob is date default null.
how can i recover the error. help me. please give any suggestion.



Reply With Quote
Bookmarks