Date display configuration for Drupal

<?php $fielditems = field_get_items('node', $node, 'field_date_of_event'); //print_r($fielditems); $individualitem = array_shift($fielditems); $date = date_create($individualitem['value']); $formatted_date = date_format($date,"l, F j"); print($formatted_date); ?>
Print a formatted date using the php date values string. We had issues with the date not displaying correctly from the module backend even after it had been configured a specific way. This overrides that and prints the date the way we wanted it to.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.