Codice PHP:
$diff = (strtotime($oggi) - strtotime($miadata)) / 86400