date not correct
Posted on 2010-08-30
how do i convert php date to mysql date based on php variable? for example, if i use this code:
$destroydate = $_GET['destroydate']; it displays 08-11-2019 which is being passed from the previous page with this code:
$destroydate = date('d-m-Y', strtotime(mysql_result($act,$i,"destroydate"))); for displaying on page.
however, if i do:
$destroydate = date('Y-m-d', strtotime($_GET['destroydate'] )); it shows a date of
2014-05-24 which is nothing like the date i passed. what is the correct way to format this for inclusion in mysql?. many thanks;