I am trying to print the values from a field collection using following code in Drupal 7 node.But the date values are not getting.
$wrapper = entity_metadata_wrapper('node', $node); $formtype = field_get_items('node', $node, 'field_latest_schedules'); foreach($formtype as $itemid) { $item = field_collection_field_get_entity($itemid); print $item->field_course_starts_on['und'][0]['safe_value']; print $item->field_course_ends_on['und'][0]['safe_value']; }
How can i print the date from a filed collection?