Format date in Shopware 6 email templates
I could not find the information so this might be useful to someone. Shopware 6 uses twig templating system, therefore you can format dates as you wish very easily.
By default the order confirmation email template uses
This will output the date as follow
February 10, 2021 16:56 And that might not be the desired format. Therefore it can easily be formatted differently by passing a parameter to the function:
This will format the date as follow
date method accepts works mostly like the PHP
date method, so you can pass a second argument such as the time zone.