Format date field in twig Date field having multiple values. Need to format the output.

{% for item in items %}
&lt;div{{ attributes }}&gt;{{ item.content|date(format="F j, Y") }}&lt;/div&gt;
{% endfor %}


item.content showing the date as updated. But not able to format the result. Got the below error,


  TypeError: DateTime::__construct() expects parameter 1 to be string,
  array given in...


Please suggest on this issue.
In Twig, drill down to the timestamp value:

node.html.twig:

{{ content.field_name['#items'].value | date('F d, Y') }}


For a loop, do:

{% for items in content.field_name['#items'] %}
  {{ items.value | date('F d, Y') }}
{% endfor %}


field.html.twig:

{% for item in items %}
  {{ item.content["#markup"] | date('F d, Y') }}
{% endfor %}


Note: Set field format display option to plain or custom if using the field template. This field option can break your site just by someone changing the format option for the field, so use caution.