Object of class DateTime could not be converted to string

后端 未结 7 692
灰色年华
灰色年华 2020-11-27 19:16

I have a table with string values in the format of Friday 20th April 2012 in a field called Film_Release

I am looping through and i want to convert

7条回答
  •  感动是毒
    2020-11-27 20:03

    If you are using Twig templates for Symfony, you can use the classic {{object.date_attribute.format('d/m/Y')}} to obtain the desired formatted date.

提交回复
热议问题