[Solved] News date formatting?

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
ravonet
Forum Members
Forum Members
Posts: 59
Joined: Fri Jan 11, 2008 12:04 pm

[Solved] News date formatting?

Post by ravonet »

I would like to change the News module date format from:

jan 15, 2009 ...to... 15-01-2009

But I can't figure out how to do this.

I'm using CMS MS 1.5.1 and News 2.9.1 and in my news-template I use: {$entry->postdate|cms_date_format}

I've searched the forum and found this code: {news number="2" dateformat=" %d %B %Y"} but then I get this error: Warning: Parameter dateformat is not known... dropped in /home/www/mydomain.com/lib/misc.functions.php

I've found other solutions as well but with same error result.

Any ideas?

Thanks in advance.
Last edited by ravonet on Thu Jan 15, 2009 11:13 am, edited 1 time in total.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm
Location: Raalte, the Netherlands

Re: News date formatting?

Post by RonnyK »

You could either modify it in GlobalSettings at the bottom, for the general dateformat....

Or put something like
{$entry->postdate|cms_date_format:"%d-%m-%Y"}
in your template... No need for the parameter to be called in the News-calling.

Ronny
ravonet
Forum Members
Forum Members
Posts: 59
Joined: Fri Jan 11, 2008 12:04 pm

Re: News date formatting?

Post by ravonet »

Thank you so much - love this forum  8)
User avatar
NRGy
Forum Members
Forum Members
Posts: 17
Joined: Tue Jun 23, 2009 10:30 am
Location: Tashkent

Re: [Solved] News date formatting?

Post by NRGy »

Thanx, it really works.
I just searched it :)
Post Reply

Return to “Modules/Add-Ons”