calculate date field duration
<?php
//dpm($data);
date_default_timezone_set('UTC');
$date_arrival_str = $data->field_field_date[0]['raw']['value'];
$date_departure_str = $data->field_field_date[0]['raw']['value2'];
$date_arrival = new DateTime($date_arrival_str);
$date_departure = new DateTime($date_departure_str);
$diff = $date_departure->diff($date_arrival);
$hours = $diff->h;
$hours = $hours + ($diff->days*24);
echo $hours;
?>