I have been using the following code:
$mySQLStatement .= "\'" . date(\'Y-m-d\', strtotime(str_replace(\'-\', \'/\', $entry->date))) ."\',&quo