Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
Wanted to report that

Code: Select all
<cms:show k_page_date format='jS M, y' />


doesn't work at all. The date displayed is

Code: Select all
2013-07-03 07:08:41


I see the value is assigned in page.php file line 1628

Code: Select all
$vars['k_page_date'] = $this->publish_date;


doesn't uses PHP date() formating function. Thanks!
Hi and welcome :)

What you have observed is actually the expected behaviour -
The cms:show tag is simply meant to output whatever value a variable contains.
In this case, the k_page_date variable does hold a date's value in yyyy-mm-dd hh:mm:ss format.

If you wish to format the date in a particular way, it is the cms:date tag that should be used e.g
Code: Select all
<cms:date k_page_date format='jS M, Y' />

You can get more info at http://www.couchcms.com/docs/tags-reference/date.html

Hope this clears the confusion.
Thanks.
Thank you kk! But I think you've missed the first part of my message:

Code: Select all
<cms:show k_page_date format='jS M, y' />


doesn't work at all. The date displayed is...
Okay, never mind. It was misspelled with

Code: Select all
<cms:show...


instead of

Code: Select all
<cms:date...


because I typed exactly liked the tutorial image

Image

Thank you for the quick support!
4 posts Page 1 of 1
cron