dateCompare exact match to todays date

though I’ve specified dateFormat as “ddMMyyyy” still the dates are evaluating as below and hence comparison is always failing

$firstDate = 2021-09-13T00:00:00.000Z
$secondDate = 2021-09-13T16:16:03.397Z

How can I ignore other part of dates e.g hours, minutes, seconds etc?