Skip to content

Formatting (#datetime, text case, #trim)

#datetime formats a date. On its own it outputs today’s date; give it a date field to format that field:

Today is {{#datetime}}.
Completion is due on {{#datetime keydates.completion}}.

By default dates are shown as d mmmm yyyy (e.g. 2 January 2025). To choose your own format, add a format in single quotes:

{{#datetime keydates.completion 'dd/mm/yyyy'}}
{{#datetime $now 'dddd d mmmm yyyy'}}

If keydates.completion is 2 January 2025, the first line outputs 02/01/2025 and the second outputs Thursday 2 January 2025.

TokenMeaningExample
yyyy4-digit year2025
yy2-digit year25
mmmmMonth nameJanuary
mmmShort monthJan
mm2-digit month01
mMonth number1
ddddDay nameThursday
dddShort dayThu
dd2-digit day02
dDay number2
doDay with ordinal2nd
hh:mmTime03:04
aam/pmam

To include literal words in a format, wrap them in square brackets, e.g. '[Completion:] d mmmm yyyy'.

HelperEffectExample
#uppercaseALL CAPS{{#uppercase stakeholder.client.1.surname}}
#lowercaseall lower case{{#lowercase stakeholder.client.1.email}}
#titlecaseCapitalises Each Word{{#titlecase stakeholder.client.1.fullname}}

Each takes a single data marker or variable.

#trim removes spaces from the start and end of a value:

{{#trim stakeholder.client.1.forename}}

← Maths · Contents · Composition →