You have several possible ways to do this. First, you can select date string in desired format from DBMS:
SELECT *, DATE(dateexp) AS date_holder FROM t1 WHERE dateexp < currdate()
and then apply it in your DateTime
object:
$d1 = new DateTime(date('Y-m-d'));
$d2 = new DateTime($row['date_holder']);
$interval = $d1->diff($d2);
$days = $interval->format('%r%a');
Second - you can, as you've mentioned, create DateTime
from format:
$d1 = new DateTime(date('Y-m-d'));
$d2 = new DateTime(date('Y-m-d', strtotime($row['dateexp'])));
$interval = $d1->diff($d2);
$days = $interval->format('%r%a');
-so you'll be able to avoid selection of additional field in DBMS