In contract and invoice templates, you can control how date and time values appear by applying Liquid filters. Without formatting, dates will show up in a long technical format. With filters, you can display a clean date (like 01/11/2023
), time (like 12:00
), or a custom format that suits your layout.
This article shows which fields support date and time formatting and how to format them for PDF output.
Table of contents
Default output of date and time fields
Apply formatting with Liquid filters
Examples of date and time formatting
Supported fields that include date or time
Formatting options for date and time
1. Default output of date and time fields
When you use a date field without any formatting — such as {{ event.start }}
— it will display a full ISO 8601 timestamp by default:
2023-11-01T12:00:00+01:00
This includes both date, time, and time zone — which is usually not ideal for PDF documents.
2. Apply formatting with Liquid filters
You can use the date
filter to format your date or time. For example:
{{ event.start | date: "%d/%m/%Y" }}
→ 01/11/2023
{{ event.start | date: "%H:%M" }}
→ 12:00
You can combine date and time in one line as well:
{{ event.start | date: "%d/%m/%Y %H:%M" }}
→ 01/11/2023 12:00
3. Examples of date and time formatting
Here are some examples of how to format fields commonly used in templates:
{{ contract.date | date: "%d/%m/%Y" }}
→23/10/2025
{{ invoice.date | date: "%Y-%m-%d" }}
→2025-10-23
{{ invoice.deadline | date: "%A %d %B %Y" }}
→Friday 31 October 2025
{{ event.start | date: "%d/%m %H:%M" }}
→05/11 20:30
{{ event.end | date: "%H:%M" }}
→22:00
4. Supported fields that include date or time
The following fields support Liquid date and time formatting:
contract.date
invoice.date
invoice.deadline
event.start
event.end
5. Formatting options for date and time
You can format any of the supported fields by applying one or more of the options below.
Date formatting
Purpose: Format a date to your preferred structure.
Example:
{{ event.start | date: "%B %d, %Y" }}
→ April 16, 2017
Common tokens:
%B
— Full month name (January
)%d
— Day of the month with leading zero (01
)%Y
— Full year with century (2025
)
Full list of date tokens:
%a
— Abbreviated weekday name (Sun
)%A
— Full weekday name (Sunday
)%b
— Abbreviated month name (Jan
)%B
— Full month name (January
)%d
— Day of the month, two digits (01..31
)%e
— Day of the month without leading zero (1..31
)%j
— Day of the year (001..366
)%m
— Month number (01..12
)%U
— Week number (Sunday first) (00..53
)%W
— Week number (Monday first) (00..53
)%w
— Day of the week (Sunday = 0)%x
— Preferred date representation (locale-based)%y
— Year without century (00..99
)%Y
— Year with century (2025
)
Time formatting
Purpose: Format time to your preferred structure.
Example:
{{ current_time | date: "%H:%M %p" }}
→ 14:55 PM
Common tokens:
%H
— Hour (24-hour format)%M
— Minute%p
— Meridian (AM
/PM
)
Full list of time tokens:
%H
— Hour (24-hour clock) (00..23
)%I
— Hour (12-hour clock) (01..12
)%l
— Hour (12-hour clock, no leading zero)%M
— Minute (00..59
)%P
— Meridian lowercase (am
/pm
)%p
— Meridian uppercase (AM
/PM
)%S
— Second (00..60
)%X
— Preferred time representation (locale-based)%Z
— Time zone name