Docs › Templates
Value formats, serial numbers, dates
{{price|won}}, {{date|date:YYYY.MM.DD}}, {{seq:0001}}, {{today+365}}: change how values print without touching the data.
Add |format after a field name to change how its value prints. The data stays as it is. In the designer, pick one from the "Format" list in the field table or in text and barcode properties.
| Write | Value | Prints |
|---|---|---|
{{price|money}} | 12900 | 12,900 |
{{price|won}} | 12900 | 12,900원 |
{{date|date}} | 20261022, 2026-10-22, 45950 (Excel date) | 2026-10-22 |
{{date|date:YYYY.MM.DD}} | 2026-10-22 | 2026.10.22 |
{{date|date:D/M/YY}} | 2026-10-22 | 22/10/26 |
{{no|pad:6}} | 42 | 000042 |
{{code|upper}} · |lower · |trim | ab-1 | AB-1 · ab-1 · ab-1 |
Date tokens: YYYY YY MM M DD D HH mm ss. An unknown format name leaves the value unchanged.
Serial numbers and today
{{seq}}: the label's position in this print (1, 2, 3…). With copies per row, every printed label counts.{{seq:0001}}: the digits give the start and the width.0001starts at 0001 with 4 digits,0100at 0100.- Change the start with
print(t, rows, { serialStart: 501 }), the same as "First number" on the bulk print page. {{today}},{{today+365}}(best before),{{today-1}}: the print date in your time zone;|date:FMTworks too.{{now}}: the print time asYYYY-MM-DD HH:mm.
Drawn by the real library
Code for this example
const template = {
v: 1,
name: 'Asset tag',
paper: { kind: 'roll' },
label: { width: 50, height: 25 },
elements: [
{ type: 'text', x: 2, y: 2, w: 30, h: 5, text: '{{name}}', size: 8, bold: true },
{ type: 'text', x: 30, y: 2, w: 18, h: 5, text: '{{price|money}}', size: 8, align: 'right' },
{ type: 'barcode', x: 2, y: 8, w: 46, h: 15, format: 'code128', value: 'A-{{seq:0001}}', showText: true },
],
};
const rows = [
{ name: 'Laptop', price: 1290000 },
{ name: 'Monitor', price: 329000 },
];
Label82.print(template, rows);