Date format in ListPage field
18 posts by 6 authors in: Forums > CMS Builder
Last Post: November 18, 2011 (RSS)
By esteban - May 11, 2010
What about time in date in 2010 year :-)
I show date like this: <?php echo $artykulyRecord['createdDate'] ?> and don't need time only date: 11.05.2010
Thanks for help
Re: [esteban] Date format in ListPage field
By Jason - May 12, 2010
You could try something like this:
<?php echo date("m.d.Y",$artykulyRecord['createdDate']); ?>
You can take a look at this page:
http://php.net/manual/en/function.date.php
to see what other formatting options PHP has available.
Hope this helps.
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Jason] Date format in ListPage field
By esteban - May 12, 2010
Notice: A non well formed numeric value encountered in /home/trener_osobisty/trener_osobisty/article.php on line 192 01.01.1970
I put this:
<?php echo date("d.m.Y",$artykulyRecord['createdDate']); ?>
and on the end put a date but not corect. Any idea?
Re: [esteban] Date format in ListPage field
By Jason - May 12, 2010
Try changing it to this:
<?php echo date("d.m.Y",strtotime($artykulyRecord['createdDate'])); ?>
Hope this helps.
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Jason] Date format in ListPage field
By markr - November 17, 2011
Re: [markr] Date format in ListPage field
By Jason - November 17, 2011
The best way to do this would be to create a custom plugin to change the format of the date in the list view. That way you can control which sections have the change applied to them and your changes won't be overwritten when you upgrade your version of CMS Builder.
If you have experience creating plugins, you can use the listRow_displayValue filter to modify those values. If you need any help with this, please email consulting@interactivetools.com and we can go over some options.
Hope this helps
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [markr] Date format in ListPage field
By InHouse - November 18, 2011
If I use a date/time field as one of my ListPage Fields, what I really want is the ability to to change the date display format as needed for that menu's ListPage. Possible?
+1 for this request. It's an onging topic of discussion in the 'future suggestions and product direction' thread.