Cannot change date format
- Posted by Pamela (3) Offline
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
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
Please Log in or Create an account to join the conversation.
- Posted by TemplatePlazza (5310) Offline
- Posted by Pamela (3) Offline
- Posted by TemplatePlazza (5310) Offline
- Posted by Pamela (3) Offline
- Posted by TemplatePlazza (5310) Offline
Your code should be working good.case 4:
echo "";
echo JHTML::_('date', htmlspecialchars( $item->created ),'m/d/y', $offset); // Day name(short), Month(short) date th Year
echo "<br/>";
break;
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
Please Log in or Create an account to join the conversation.