Number formatting
Padding
Padding is controlled by adding a parameter that begins with either WIDTH= (to control the minimum number of digits), and/or PADDING= which changes the default padding character from zero to some other character, e.g. space. For example:
| Number | Parameter | Result |
|---|---|---|
| 42 | (none) | 42 |
| 42 | WIDTH=5 | 00042 |
| 42 | WIDTH=5;PADDING=␣ | ␣␣␣42 |
A named format that writes numbers with its own digits, such as alpha or
arabicdigits, pads with its first digit, the way the default format pads
with 0 v6.1. For example, {YEAR;FORMAT=alpha;WIDTH=5} gives
AACZY for 2026. Before v6.1, it padded with spaces. PADDING= still takes
precedence, and formats that write names, such as shortmonth, still pad with
spaces.
Number to text conversion
The format used to convert a number to a text can be changed by adding a parameter that starts with FORMAT=. The following formats are built in, but more formats can be created by the user:
| Format | Description |
|---|---|
alpha | Alpha encoding using capital letters. Exactly the same as #ABCDEFGHIJKLMNOPQRSTUVWXYZ |
arabicdigits v6.1 | Arabic-Indic digits, ٠١٢٣٤٥٦٧٨٩ |
persiandigits v6.1 | Persian digits, ۰۱۲۳۴۵۶۷۸۹ |
thaidigits v6.1 | Thai digits, ๐๑๒๓๔๕๖๗๘๙ |
shortmonth | Translates numbers 1-12 into an English three capital letter month name. (JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC) |
shortweekday | Translates numbers 1-7 into an English three capital letter week day name. (MON, TUE, WED, THU, FRI, SAT, SUN) |
Additionally, the following special formats are available, determined by the special first character of the format:
| First character | Format | Description |
|---|---|---|
{ | {word1,word2,...} | Use a lookup table. The words are separated by semicolon (;), plus a closing brace at the end. For example:
If the first word starts with
|
# | #numerals | Use numerals instead of standard numerals 0-9. For example:
|