Page 1 of 1

[Solved] News date formatting?

Posted: Thu Jan 15, 2009 10:23 am
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.

Re: News date formatting?

Posted: Thu Jan 15, 2009 10:47 am
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

Re: News date formatting?

Posted: Thu Jan 15, 2009 11:05 am
by ravonet
Thank you so much - love this forumĀ  8)

Re: [Solved] News date formatting?

Posted: Sat Jun 27, 2009 7:04 am
by NRGy
Thanx, it really works.
I just searched it :)