Is there a better way to convert a date in the mm/dd/yyyy format to that used by MySQL than what I am doing?
/ Convert a date for MySQL /
function mysql_convert_date($date) {
if ($date) {
$array = explode("/", $date);
if (checkdate($array[0], $array[1], $array[2])) {
$time = mktime(0, 0, 0, $array[0], $array[1], $array[2]);
$date = date("Y-m-d", $time);
} else {
$date = "";
}
} else {
$date = "";
}
return $date;
}
Todd