Converting text to a date
If you are importing data from another system (such as Clio) where the date field arrives as plain text rather than a date type, useas_datetime() with strftime to convert it:
%-d instead of %d to suppress the leading zero (e.g., “January 3” instead of “January 03”).
Formatting dates using Calculations (Invisible Logic)
You can also format a date variable through Calculations. Create a new Text variable, select your date variable as the source, choose Format Date as the operation, and enter the format code. The resulting text variable can then be referenced anywhere in your document with{{ FormattedDateVariable }}.
Calculating dates
These functions derive new date values from existing ones — useful for deadlines, notice periods, and age calculations.Age or years elapsed from a date to today
Age or years elapsed from a date to today
Years between two specific dates
Years between two specific dates
Months between two dates
Months between two dates
Add or subtract calendar days, months, or years
Add or subtract calendar days, months, or years
years with months, days, or weeks. Use - instead of + to go back in time.Add or subtract business days
Add or subtract business days
Next or prior business day
Next or prior business day
Last day of a month
Last day of a month
Formatting numbers
Use a Number question type for decimal values and an Integer question type for whole numbers. Apply the functions below in your document template.Standard number formats
Currency — $100,000.00
Currency — $100,000.00
No commas, no decimals — 100000
No commas, no decimals — 100000
Two decimals with commas — 100,000.00
Two decimals with commas — 100,000.00
No decimals with commas — 100,000
No decimals with commas — 100,000
Custom decimals with commas
Custom decimals with commas
2 with the number of decimal places you want.Custom decimals without commas
Custom decimals without commas
2 with the number of decimal places you want.Ordinal numbers
Write a number as an ordinal (1st, 2nd, 10th, etc.):Numbers written as words
Convert a number to its written-out English form (recommended with the Integer question type):International number formatting
Rounding in document templates
Round down (floor) to two decimal places:Formatting special numbers
Usenumber_custom() to force specific punctuation patterns on any number. Have the client enter the value as a Number question type, then apply the mask in your template using n for each digit position.
- Phone numbers
- EINs
Formatting words
These functions control capitalization and text transforms. If you want the output to match exactly what the client typed, you do not need any of the functions below.Case transforms
APPLE — all caps
APPLE — all caps
Apple And Pear — title case
Apple And Pear — title case
Apple and pear — capitalize first only
Apple and pear — capitalize first only
apple — all lowercase
apple — all lowercase
Articles and plurals
Add “a” or “an” before a variable automatically:variablename is an Integer. Output: 1 apple / 3 apples
Punctuation
Add a trailing period only when the text does not already end with one (useful for company names):Verb conjugation
To conjugate a verb based on whether one person, multiple people, or a third-party singular is acting:- Create a multiple-choice question with variable name
conjugationand choices:1sg,3sg,pl. - Use this syntax in your template (replacing
allegewith your verb):
Formatting text area questions
Text area variables require special handling to preserve line breaks in the output.Preserve line breaks
Preserve line breaks
Output as a numbered list
Output as a numbered list
Output as a bulleted list
Output as a bulleted list
Join lines with commas
Join lines with commas

