Format Looper Twig Date

I’m pulling the time of a post using a custom consumer to pull a date from a database:

This is what dynamic code I’m using to pull the date.
{{ looper.field({"key":"time"}) }}

I’m trying to format this date as February 19, 2025, which is format="F j, Y" in Twig it should be "format":"F j, Y"
How do I format {{ looper.field({"key":"time"}) }} so it displays in the format F j, Y?

Using the "format": with the colon is good. You also need to add "type": "date" and it should work fine.

{{ looper.field({"key":"time", "format": "F j, Y", "type": "date"}) }}

You can also use the date filter in Twig.

{{ looper.field({"key":"time"}) | date('F j, Y') }}

Have a great day.

@charlie Thank you! I’m extremely grateful for your help. The second solution with the date filter in Twig worked for me.{{ looper.field({"key":"time"}) | date('F j, Y') }}

1 Like

You aremost welcome, @OctoCog.