Change date format in News Module?

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
photo2pictures
Forum Members
Forum Members
Posts: 14
Joined: Thu Sep 09, 2010 11:04 pm

Change date format in News Module?

Post 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?
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Change date format in News Module?

Post 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'.
photo2pictures
Forum Members
Forum Members
Posts: 14
Joined: Thu Sep 09, 2010 11:04 pm

Re: Change date format in News Module?

Post 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..?
applejack
Power Poster
Power Poster
Posts: 1014
Joined: Fri Mar 30, 2007 2:28 am

Re: Change date format in News Module?

Post by applejack »

Alternatively

Code: Select all

{$entry->postdate|date_format:'%d %m %Y'}
http://php.net/manual/en/function.date.php
Post Reply

Return to “Modules/Add-Ons”