hous
hous

Reputation: 174

Change format of date with Symfony2

How can I insert new \Datetime() jj-mm-aaaa format with Symfony2 ? or if is it impossible how to show it in this format in Twig N

Upvotes: 0

Views: 85

Answers (1)

Ahmed Siouani
Ahmed Siouani

Reputation: 13891

What about using the Date Twig Filter,

{{ yourDateTimeObject|date("d-m-Y") }}

Upvotes: 4

Related Questions