I'm using Drupal 7 and Clean theme. And when created a node, show date top on node. No problem. But i want remove only hour and min. tab.
How can i solve this?
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.
Sign up to join this communityI would disable the created date display under the content type settings, and then just add a new date field whose display settings you can alter just like any other field.
The other option would be to change it by overriding hook_tokens in your theme. Specifically, you would override format_date($node->created, 'medium', '', NULL, $language_code);
with your custom date format.
I think you want to have your node show June 12, 2012
If that is the case, you can do this:
function THEME_preprocess_node(&$variables) {
if ($variables['submitted']) {
$variables['submitted'] = t('Posted: !datetime', array( '!datetime' => format_date($variables['node']->created, 'custom', 'F j, Y')));
}
}
Here's PHP documentation for date formats: http://php.net/manual/function.date.php