Docmosis Examples
⭐ This is a premium feature. Please click here for more information.
This page shows simple examples for working with Docmosis Cloud (DWS4) templates when designing LabHQ custom reports.
For the full documentation, see the official Docmosis Template Guide (PDF).
In this article
Inserting Data
<<samp.id>>
In this example, <<samp.id>> will be rendered with the value of the sample identifier.
📒 To see a list of all supported template fields for custom reports, see here.
To see more advanced examples, see Docmosis Template Tutorials here.
To see the complete manual for template authors, download the Docmosis Cloud Template Guide PDF document here.
Formatting Dates
Docmosis provides the dateFormat function to control how dates appear in generated documents.
For example, if a job date value is available in the template as a custom field in slot 1:
<<job.cf_1.value>>
You can format it using dateFormat .
Example:
<<{dateFormat(job.cf_1.value, 'MM/dd/yyyy')}>>
Output:
03/12/2026
This converts the date into a US date format.
Common Date Formats
UK / International Formats:
| Template Field | Example Output |
|---|---|
<<{dateFormat(job.cf_1.value, 'dd/MM/yyyy')}>> |
12/03/2026 |
<<{dateFormat(job.cf_1.value, 'dd MMM yyyy')}>> |
12 Mar 2026 |
<<{dateFormat(job.cf_1.value, 'dd MMMM yyyy')}>> |
12 March 2026 |
<<{dateFormat(job.cf_1.value, 'EEEE, dd MMMM yyyy')}>> |
Thursday, 12 March 2026 |
US Formats:
| Template Field | Example Output |
|---|---|
<<{dateFormat(job.cf_1.value, 'MM/dd/yyyy')}>> |
03/12/2026 |
<<{dateFormat(job.cf_1.value, 'MMM dd, yyyy')}>> |
Mar 12, 2026 |
<<{dateFormat(job.cf_1.value, 'MMMM dd, yyyy')}>> |
March 12, 2026 |
<<{dateFormat(job.cf_1.value, 'EEEE, MMMM dd, yyyy')}>> |
Thursday, March 12, 2026 |
Formatting Times
Docmosis can also format the time portion of a date.
| Template Field | Example Output |
|---|---|
<<{dateFormat(job.cf_1.value, 'HH:mm')}>> |
14:30 |
<<{dateFormat(job.cf_1.value, 'HH:mm:ss')}>> |
14:30:45 |
<<{dateFormat(job.cf_1.value, 'hh:mm a')}>> |
02:30 PM |
Date and Time Together
| Template Field | Example Output |
|---|---|
<<{dateFormat(job.cf_1.value, 'dd/MM/yyyy HH:mm')}>> |
12/03/2026 14:30 |
<<{dateFormat(job.cf_1.value, 'MMM dd, yyyy hh:mm a')}>> |
Mar 12, 2026 02:30 PM |
Sample Expiry Date
Below shows how Docmosis can produce a sample expiry date given a start date and a shelf life. The example assumes that custom field 1 (cf_1) will hold the date, and custom field 2 (cf_2) will hold the shelf life (e.g. days, months, years) as a number.


UK / International Formats:
| Template Field | Example Output |
|---|---|
<<{dateAdd(samp.cf_1.value, samp.cf_2.value, 'day', 'dd/MM/yyyy')}>> |
22/03/2026 |
<<{dateAdd(samp.cf_1.value, samp.cf_2.value, 'month', 'dd MMM yyyy')}>> |
12 Mar 2027 |
<<{dateAdd(samp.cf_1.value, samp.cf_2.value, 'year', 'dd MMMM yyyy')}>> |
22 March 2038 |
<<{dateAdd(samp.cf_1.value, samp.cf_2.value, 'day', 'dd MMMM yyyy')}>> |
Sunday, 22 March 2026 |
US Formats:
| Template Field | Example Output |
|---|---|
<<{dateAdd(samp.cf_1.value, samp.cf_2.value, 'day', 'MM/dd/yyyy')}>> |
03/22/2026 |
<<{dateAdd(samp.cf_1.value, samp.cf_2.value, 'month', 'MMM dd, yyyy')}>> |
Mar 22, 2027 |
<<{dateAdd(samp.cf_1.value, samp.cf_2.value, 'year', 'MMMM dd, yyyy')}>> |
March 22, 2038 |
<<{dateAdd(samp.cf_1.value, samp.cf_2.value, 'day', 'EEEE, MMMM dd, yyyy')}>> |
Sunday, March 22, 2026 |