I'm developing a page in PHP, using MVC structure and rendering the tamplete files with Smarty.
However, you have been struggling to get a date via MySQL (see the format: YEAR-MONTH-DAY HOUR: MINUTE: SECOND
I'd like it to appear in the following form: DAY / MONTH / YEAR - TIME: MINUTE
I have already managed to get the data in MySQL, as shown below:
$feed = new feedAction();
$feedPostsSelect = $feed->select();
$view->assign("feedList",$feedPostsSelect);
$view->assign("textFeed", "text");
$view->assign("usuarioFeed", "idauthor");
$view->assign("publishDateFeed", "publishDate");
And in the tpl file:
{$row.publishDate}
I've tried as in timestamp of the smarty shows, which would be:
{$smarty.now|date_format:"%d/%m/%Y - %H:%M"}
However, using row.publishDate | date_format does not work if you want to display some data on the screen.
How to proceed?
Thank you for your attention!