Convert mm/dd/yyyy into mysql timestamp?

mysql, php, timestamp

Solution

Try This

 $release_date=$_POST['release_date'];
    echo date("Y-m-d H:i:s",strtotime($release_date));

Problem

I've been trying for about two hours to get this working with no luck. I'm trying to convert a date that's entered like 11/18/2012 into a mysql timestamp but everything I've tried just ends up as either 0000-00-00 00:00:00 or NULL in the database :( I'm using PHP + MYSQL so a solution in either would be great

Original source