I get an error when i try to string replace the date and save it in the mySQL db. The reason is the format of the DATE field. i have added my PHP code, and mySQL error message below.
$nowDate = str_replace('/', '-', $_POST['datenow']);
echo $nowDate;
Output > 08-15-2012 , I am inserting this record to the database, but the MySQL database requires the format yyyy-mm-dd (2012-08-15) or else i get an error
Unable1 to run query:Incorrect date value: '08-15-2012' for column 'now_date' at row 1