Converting to UNIX timestamp might an easier comparison. Assuming, for now, $entrydate is a variable containing your Ymd time stamp from your database, use the following bit of code to get the UNIX timestamp and compare from there. (use date("Ymd",$entrytime) to convert back)
$entrytime = mktime (0,0,0,substr($entrydate,4,2),substr($entrydate,6,2),substr($entrydate,0,4));