0

In a content type tpl file I can print my date field with the following:

<?php print render($content['my_date_field']); ?> 

However I need a custom date format. So instead of something like this: Sunday, June 9, 2013 - 16:50

I need to print: June 9th Sunday

I cant change the default date formats site wide or the node's field, I need to just modify how its printed in this instance.

0

Ive solved it a different way. Ive created a custom date format and I can chose that as the display option for the field for a specific view mode.

/admin/config/regional/date-time/formats

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.