How can I use the DD-MM-YY format for a date custom field using Liquid markup?

Issue symptoms

I use Liquid markup in my macro or trigger, which automatically fills in text with the value of my custom date field. However, I noticed the displayed format is MM-DD-YY. Instead, I want to use the DD-MM-YY format.

Resolution steps

For your Liquid markup to show DD-MM-YY format, use the below code and replace YourDateFieldID with the actual value. To find the actual value, go to your ticket fields page and look in the Field ID column.

{{ ticket.ticket_field_YourDateFieldID | date: "%d-%m-%Y" }}.

For more information, see these articles:

Editing and managing your ticket fields

Understanding Liquid markup and Zendesk Support

How can I format placeholders with liquid markup?