it's the function mktime() that I was looking for, to confront two dates starting from their string representation, here's an example
<?php
$birthday_stamp = mktime(19,45,0,3,10,1975);
$birthday_formatted = date('F d, Y - g:i a',$birthday_stamp);
echo "David was born on $birthday_formatted."
?>
will produce
David was born on March 10, 1975--7:45 p.m.
Thanks
Giulio