Help with date format in a template

I am using a input_datetime helper to just store a date to use in a template.
All I want to do is change the date format from yy/mm/dd to dd/month.

states(‘input_datetime.alfie’) shows 2024-04-21

Would like it to be states(‘input_datetime.alfie’) showing 21 Apr

Hello and welcome to the forum. Please format your config for the forum in future. See:

This should do what you want:

{{ state_attr('input_datetime.alfie','timestamp')|timestamp_custom('%m %b') }}

See this reference for other outputs:

Perfect. Many thanks.

1 Like