Page 1 of 1
Change date format in News Module?
Posted: Sat Aug 09, 2014 12:37 am
by photo2pictures
Where can I change the date format string for the news module, so it actually works. The user preferences for date format is not working?
Re: Change date format in News Module?
Posted: Sat Aug 09, 2014 9:04 am
by velden
Code: Select all
{$entry->postdate|cms_date_format}
That should print the date in format you configured in Site Admin >> Global Settings >> 'Date Format String'.
However note that when you're trying to e.g. print month and/or date names in a specific language, you're server must have those languages 'installed/configured'.
Re: Change date format in News Module?
Posted: Sat Aug 09, 2014 1:38 pm
by photo2pictures
I have that code applied to the templates, but it still don“t react on changes in the user preferences Language related settings. I even made the field "Date Format String" empty, but there is still no reaction?
Maybe I do it wrong..?
Re: Change date format in News Module?
Posted: Thu Aug 14, 2014 2:03 am
by applejack
Alternatively
Code: Select all
{$entry->postdate|date_format:'%d %m %Y'}
http://php.net/manual/en/function.date.php