Reference start date and end date for date field
If that is a node field, then the values you are trying to use are accessible using the following code.

$items = field_get_items('node', $node, 'field_time');

$from = $items[0]['value'];
$to = $items[0]['value2'];