In this post I am going to explain how how to display date with different format in Prestashop 1.7.
In order to display a date in your .tpl file, you can use the smarty.now function.
Here are some common examples:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | {$smarty.now|date_format:"%b %e %Y"} Result: Oct 19 2019 {$smarty.now|date_format:"%D"} Result: 10/19/19 {$smarty.now|date_format:"%A, %e %B %Y"} Result: Saturday, 19 October 2019 {$smarty.now|date_format:"%A"} Result: Saturday {$smarty.now|date_format:"%c"} Result: Sat 19 Oct 2019 02:37:28 AM EDT |
For more date format option please click below smarty documentation link.
Thats it!
Write an article about ecommerce that help people to grow their ecommerce business. You’ll find best ecommerce guide, news, tips & more!
Leave a Reply