i need to compare two dates where if one date is greater than the other then an sql will run. this is my code
date_default_timezone_set(\'Asia/Kuala_Lumpur\'); $
try this,
date("Y-m-d", strtotime($date)) > date("Y-m-d", strtotime($duedate))
could you try and use the date format before using strtotime
$duedate = $row['payment_due']; $duedate = $duedate->format('Y-m-d G:i:s');