How to format date variable in Smarty for dd / mm / YYYY

1

I am trying to format a date in Smarty which is in this {$Grid.Row.DataEmissao.DisplayValue} format being displayed like this: 15-03-2018 , how can I format it to 15/03/2018 to display in my report, even read on some documents, but what I saw was this:

{$smarty.now|date_format}
{$smarty.now|date_format:"%A, %B %e, %Y"}
{$smarty.now|date_format:"%H:%M:%S"}
{$yesterday|date_format}
{$yesterday|date_format:"%A, %B %e, %Y"}
{$yesterday|date_format:"%H:%M:%S"}
MOSTRA:
Feb 6, 2001
Tuesday, February 6, 2001
14:33:00
Feb 5, 2001
Monday, February 5, 2001
14:33:00

But in my case, it does not solve.

    
asked by anonymous 21.03.2018 / 20:30

1 answer

1

The smarty uses some standard php functions for some things like in the case of dates strftime() the formatting rule is the same as in documentation

  

date_format is essentially a wrapper to PHP's strftime () function. You may have more or less conversion specifiers available depending on your system's strftime () function where PHP was compiled.

{$smarty.now|date_format:"%d/%m/%Y"}
    
21.03.2018 / 20:39