I'm trying to format a date field inside of a DS custom field. I'm printing the field from the entity object, and the value is a string. I've tried passing it through date_format but that doesn't work. Any help would be appreciated.

<?php print '<h1 id="page-title">' . $entity->title . ' - ' . format_date($entity->field_start_end_date['und'][0]['value'], 'medium') . '</h1>'; ?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.