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

Help!
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

Hi,

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

Thanks but not working. I have error:

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

Hi,

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 esteban - May 12, 2010

Yes! Thank you ! :-)

Re: [Jason] Date format in ListPage field

By markr - November 17, 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?

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.