Difference of two Dates in Computed Field
Here is a sample snippet (to be used in Computed Code PHP Block inside of a computed field)

$food_date_value = array_pop(field_get_items($entity_type, $entity, 'field_food_date'));
$food_date = new DateObject($food_date_value['value'], '');
$current_date = new DateObject('now', '', 'm/d/Y');
$entity_field[0]['value'] =$food_date-&gt;difference($current_date, 'days');


field_food_date is a date in the Unix Timestamp format (another field in my content type). DateObject can then be used for doing any date calculations.