The following snippet makes you format a date field inside a twig file.

{% set date = content.field_job_expiration.value|date('U')|format_date('short') %}
<p>Expiration: {{ date }}</p>

 

 

Saved you some valuable time?

Buy me a drink 🍺 to keep me motivated to create free content like this!