I want to convert user-submitted date format (mm/dd/yyyy) to a MySQL date format (YYYY-mm-dd). Submission is via a simple PHP form direc tto MySQL database.
$mysql_date = date('Y-m-d H:i:s', strtotime($user_date));
2.1m questions
2.1m answers
60 comments
57.0k users