The below object, named 'profile' is available to me in a twig template. I can dump the variables with {{ dump(profile) }}. How do I print the 'created' timestamp? I've tried every variation of code I can think of.

enter image description here


You can get the created value from the entity profile:

{{ profile.created.value }}

or formatted:

   {{ profile.created.value|format_date('long') }}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.