Cannot change date format

Hello

I have tried to change the date format using information from another post, below

1
echo JHTML::_('date', htmlspecialchars( $item->created ),'H:i', $offset); // ' hour:minute

In your case change the 'H:i' part to 'd/m/y' and you're done!

However, it is not working.

I am using joomla 3.3.6

this is my updated php (I have used the template over-ride function, but even when i edit the core php it does not work.

case 4:
echo "<span class=\"lnd_introdate\">";
echo JHTML::_('date', htmlspecialchars( $item->created ),'m/d/y', $offset); // Day name(short), Month(short) date th Year
echo "<br/></span>";
break;

Can anyone give me an idea as to what I could do?

thank you
10 years 2 months ago #1 by Pamela

Please Log in or Create an account to join the conversation.

  • Posted by TemplatePlazza (5310) Offline
Hi, can you tell me what extension you're talking about?
10 years 2 months ago #2 by TemplatePlazza

Please Log in or Create an account to join the conversation.

I am using the latestnews+ module
10 years 2 months ago #3 by Pamela

Please Log in or Create an account to join the conversation.

  • Posted by TemplatePlazza (5310) Offline
ok what format do you want to use / to change?
10 years 2 months ago #4 by TemplatePlazza

Please Log in or Create an account to join the conversation.

mmm-dd replace short date format
10 years 2 months ago #5 by Pamela

Please Log in or Create an account to join the conversation.

  • Posted by TemplatePlazza (5310) Offline

case 4:
echo "";
echo JHTML::_('date', htmlspecialchars( $item->created ),'m/d/y', $offset); // Day name(short), Month(short) date th Year
echo "<br/>";
break;

Your code should be working good.
Have you set the show date type to Time Only (see this www.dropbox.com/s/3w1o1hwrl9dcb92/e1a8r.jpg?dl=0)? Because you have edited the 'Time Only' code part
10 years 2 months ago #6 by TemplatePlazza

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum