> ## Documentation Index
> Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MDX formats

This page lists all available MDX formats for the `FORMAT_STRING` cell property, along
with their support in Atoti.

The official documentation for the formats can be found on the
[Microsoft website](https://docs.microsoft.com/en-us/analysis-services/multidimensional-models/mdx/mdx-cell-properties-format-string-contents).

## Introduction

The `FORMAT_STRING` cell property specifies how to format both string and raw numeric
values. The following tables detail the syntax and the available formatting
characters that can be used for the property.

Atoti uses the `FORMAT_STRING` cell property to format the `VALUE`, storing the
formatted value in the `FORMATTED_VALUE` cell property.
This behavior conforms to Microsoft's specification regarding these properties.

On the client's side, Atoti UI directly uses the formatted values from the
`FORMATTED_VALUE` cell property.

Excel behaves differently **for measures** and does the formatting on the client, ignoring
the `FORMATTED_VALUE` cell property.
This implies that:

* formats that are unsupported or partially supported may still be rendered correctly in
  Excel.
* [custom formatters](#custom-formatters) defined within Atoti will be ignored.

The formatting of other formattable elements such as dimension members behaves the same
way both in Excel and Atoti UI.

The following symbols used throughout the page describe support in Atoti for the
standard formatting syntax.

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Symbol                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | Meaning             |
| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | ------------------- |
|                  <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/check.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=8e077caa27c8997138897bea9c36f751" alt="tick" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/check.svg" />                 | fully supported     |
|                          <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/add.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=e144df45b8e2cf88dc1a402270eb6950" alt="plus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/add.svg" />                         | partially supported |
| <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/forbidden.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=1b5798b42ba2fda6004d317a8e6886a5" alt="minus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/forbidden.svg" /> | not supported       |

## Numeric Formats

When designating a numeric formatter, the format string must be enclosed with either
`DOUBLE[]` or `INT[]` (example: `DOUBLE[#.###]`).

`DOUBLE` and `INT` can be used interchangeably. They accept the same format strings and
produce the same results.

### Sections

A user-defined format expression for numbers can have anywhere from one to four sections,
separated by semicolons. If the format argument contains one of the named numeric formats,
only one section is allowed.

| Format         |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Supported                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | Description                                                                                                                     |
| -------------- | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | ------------------------------------------------------------------------------------------------------------------------------- |
| One section    | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/check.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=8e077caa27c8997138897bea9c36f751" alt="tick" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/check.svg" /> | The format expression applies to all values.                                                                                    |
| Two sections   | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/check.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=8e077caa27c8997138897bea9c36f751" alt="tick" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/check.svg" /> | The first section applies to positive values and zeros, the second to negative values.                                          |
| Three sections | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/check.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=8e077caa27c8997138897bea9c36f751" alt="tick" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/check.svg" /> | The first section applies to positive values, the second to negative values, and the third to zeros.                            |
| Four sections  | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/check.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=8e077caa27c8997138897bea9c36f751" alt="tick" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/check.svg" /> | The first section applies to positive values, the second to negative values, the third to zeros, and the fourth to null values. |

### Characters

The following table lists the characters that can appear in the format string for
numeric formats.

| Character   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           Supported                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ----------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| None        |                  <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/check.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=8e077caa27c8997138897bea9c36f751" alt="tick" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/check.svg" />                 | Displays the number without any formatting.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| 0           |                  <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/check.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=8e077caa27c8997138897bea9c36f751" alt="tick" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/check.svg" />                 | <p>Represents a digit placeholder that displays a digit or a zero (`0`).</p><p>If the number has a digit in the position where the zero appears in the format string, the formatted value displays the digit. Otherwise, the formatted value displays a zero in that position.</p><p>If the number has fewer digits than there are zeros (on either side of the decimal) in the format string, the formatted value displays leading or trailing zeros.</p><p>If the number has more digits to the right of the decimal separator than there are zeros to the right of the decimal separator in the format expression, the formatted value rounds the number to as many decimal places as there are zeros.</p><p>If the number has more digits to the left of the decimal separator than there are zeros to the left of the decimal separator in the format expression, the formatted value displays the additional digits without modification.</p>                                                                                                                                                      |
| #           |                  <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/check.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=8e077caa27c8997138897bea9c36f751" alt="tick" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/check.svg" />                 | <p>Represents a digit placeholder that displays a digit or nothing.</p><p>If the expression has a digit in the position where the number sign (`#`) appears in the format string, the formatted value displays the digit. Otherwise, the formatted value displays nothing in that position.</p><p>The number sign (`#`) placeholder works like the zero (`0`) digit placeholder except that leading and trailing zeros are not displayed if the number has the same or fewer digits than there are `#` characters on either side of the decimal separator in the format expression.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| .           |                  <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/check.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=8e077caa27c8997138897bea9c36f751" alt="tick" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/check.svg" />                 | <p>Represents a decimal placeholder that determines how many digits are displayed to the left and right of the decimal separator.</p><p>If the format expression contains only number sign (`#`) characters to the left of the period (`.`), numbers smaller than 1 start with a decimal separator. To display a leading zero displayed with fractional numbers, use zero (`0`) as the first digit placeholder to the left of the decimal separator.</p><p>The actual character used as a decimal placeholder in the formatted output depends on the number format recognized by the computer system.</p><p>Note: In some locales, a comma is used as the decimal separator.</p>                                                                                                                                                                                                                                                                                                                                                                                                                         |
| %           |                  <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/check.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=8e077caa27c8997138897bea9c36f751" alt="tick" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/check.svg" />                 | <p>Represents a percentage placeholder. The expression is multiplied by 100. The percent character (`%`) is inserted in the position where the percentage appears in the format string.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ,           |                  <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/check.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=8e077caa27c8997138897bea9c36f751" alt="tick" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/check.svg" />                 | <p>Represents a thousand separator that separates thousands from hundreds within a number that has four or more places to the left of the decimal separator.</p><p>Standard use of the thousand separator is specified if the format contains a thousand separator enclosed in digit placeholders (`0` or `#`).</p><p>Two adjacent thousand separators, or a thousand separator immediately to the left of the decimal separator (whether or not a decimal is specified), means "scale the number by dividing the number by 1000, rounding as required." For example, you can use the format string "`##0,,`" to represent 100 million as 100. Numbers smaller than 1 million are displayed as 0. Two adjacent thousand separators in any position other than immediately to the left of the decimal separator are treated as specifying the use of a thousand separator.</p><p>The actual character used as the thousand separator in the formatted output depends on the number format recognized by the computer system.</p><p>Note: In some locales, a period is used as the thousand separator.</p> |
| :           | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/forbidden.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=1b5798b42ba2fda6004d317a8e6886a5" alt="minus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/forbidden.svg" /> | <p>Represents a time separator that separates hours, minutes, and seconds when time values are formatted.</p><p>Note: In some locales, other characters may be used as the time separator.</p><p>The actual character used as the time separator in formatted output is determined by the system settings on the computer.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| /           |                  <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/check.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=8e077caa27c8997138897bea9c36f751" alt="tick" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/check.svg" />                 | <p>Represents a date separator that separates the day, month, and year when date values are formatted.</p><p>The actual character used as the date separator in formatted output is determined by the system settings on the computer.</p><p>Note: In some locales, other characters may used as the date separator.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| E- E+ e- e+ | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/forbidden.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=1b5798b42ba2fda6004d317a8e6886a5" alt="minus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/forbidden.svg" /> | <p>Represents scientific format.</p><p>If the format expression contains at least one digit placeholder (`0` or `#`) to the right of `E-`, `E+`, `e-`, or `e+`, the formatted value displays in scientific format and E or e is inserted between the number and the number's exponent. The number of digit placeholders to the right determines the number of digits in the exponent. Use `E-` or `e-` to include a minus sign next to negative exponents. Use `E+` or `e+` to include a minus sign next to negative exponents and a plus sign next to positive exponents.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| - + \$ ()   |                  <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/check.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=8e077caa27c8997138897bea9c36f751" alt="tick" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/check.svg" />                 | <p>Displays a literal character.</p><p>To display a character other than one of those listed, put a backslash (`\`) before the character or enclose the character in double quotation marks (`" "`).</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| \\          |                  <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/check.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=8e077caa27c8997138897bea9c36f751" alt="tick" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/check.svg" />                 | <p>Displays the next character in the format string.</p><p>To display a character that has special meaning as a literal character, put a backslash (`\`) before the character. The backslash itself is not displayed. Using a backslash is the same as enclosing the next character in double quotation marks. To display a backslash, use two backslashes (`\\`). Examples of characters that cannot be displayed as literal characters include the following characters:</p><p>The date-formatting and time-formatting characters—`a`, `c`, `d`, `h`, `m`, `n`, `p`, `q`, `s`, `t`, `w`, `y`, `/`, and `:`</p><p>The numeric-formatting characters—`#,` `0`, `%,` `E`, `e`, `comma`, and `period`</p><p>The string-formatting characters—`@`, `&`, `<`, `>`, and `!`.</p>                                                                                                                                                                                                                                                                                                                              |
| "ABC"       | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/forbidden.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=1b5798b42ba2fda6004d317a8e6886a5" alt="minus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/forbidden.svg" /> | <p>Displays the string inside the double quotation marks (`" "`).</p><p>To include a string in format from within code, use Chr(34) to enclose the text. (The character code for a double quotation mark is 34.)</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |

### Named Numeric Formats

The following table lists the predefined numeric format names.

| Format name                 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           Supported                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | Description                                                                                                                                                          |
| --------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <code>General Number</code> | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/forbidden.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=1b5798b42ba2fda6004d317a8e6886a5" alt="minus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/forbidden.svg" /> | Displays the number with no thousand separator.                                                                                                                      |
| <code>Currency</code>       | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/forbidden.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=1b5798b42ba2fda6004d317a8e6886a5" alt="minus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/forbidden.svg" /> | Displays the number with a thousand separator, if appropriate. Displays two digits to the right of the decimal separator. Output is based on system locale settings. |
| <code>Fixed</code>          | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/forbidden.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=1b5798b42ba2fda6004d317a8e6886a5" alt="minus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/forbidden.svg" /> | Displays at least one digit to the left and two digits to the right of the decimal separator.                                                                        |
| <code>Standard</code>       | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/forbidden.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=1b5798b42ba2fda6004d317a8e6886a5" alt="minus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/forbidden.svg" /> | Displays the number with thousand separator, at least one digit to the left and two digits to the right of the decimal separator.                                    |
| <code>Percent</code>        | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/forbidden.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=1b5798b42ba2fda6004d317a8e6886a5" alt="minus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/forbidden.svg" /> | Displays the number multiplied by 100 with a percent sign (%) appended to the right. Always displays two digits to the right of the decimal separator.               |
| <code>Scientific</code>     | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/forbidden.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=1b5798b42ba2fda6004d317a8e6886a5" alt="minus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/forbidden.svg" /> | Uses standard scientific notation.                                                                                                                                   |
| <code>Yes/No</code>         | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/forbidden.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=1b5798b42ba2fda6004d317a8e6886a5" alt="minus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/forbidden.svg" /> | Displays `No` if the number is 0; otherwise, displays `Yes`.                                                                                                         |
| <code>True/False</code>     | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/forbidden.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=1b5798b42ba2fda6004d317a8e6886a5" alt="minus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/forbidden.svg" /> | Displays `False` if the number is 0; otherwise, displays `True`.                                                                                                     |
| <code>On/Off</code>         | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/forbidden.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=1b5798b42ba2fda6004d317a8e6886a5" alt="minus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/forbidden.svg" /> | Displays `Off` if the number is 0; otherwise, displays `On`.                                                                                                         |

## String formats

String formatting syntax is currently not supported in Atoti.

### Sections

| Format       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           Supported                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | Description                                                                                                                 |
| ------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | --------------------------------------------------------------------------------------------------------------------------- |
| One section  | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/forbidden.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=1b5798b42ba2fda6004d317a8e6886a5" alt="minus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/forbidden.svg" /> | The format expression applies to all string values.                                                                         |
| Two sections | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/forbidden.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=1b5798b42ba2fda6004d317a8e6886a5" alt="minus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/forbidden.svg" /> | The first section applies to string data, whereas the second section applies to null values and zero-length strings (`""`). |

### Characters

The following table lists the characters that can appear in the format string for
string formats.

| Character |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           Supported                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | Description                                                                                                                                                                                                                                                                                                                                                                                          |
| --------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `@`       | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/forbidden.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=1b5798b42ba2fda6004d317a8e6886a5" alt="minus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/forbidden.svg" /> | Represents a character placeholder that displays a character or a space. If the string has a character in the position where the at sign (@) appears in the format string, the formatted string displays the character. Otherwise, the formatted string displays a space in that position. Placeholders are filled from right to left unless there is an exclamation point (!) in the format string. |
| `&`       | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/forbidden.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=1b5798b42ba2fda6004d317a8e6886a5" alt="minus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/forbidden.svg" /> | Represents a character placeholder that displays a character or nothing. If the string has a character in the position where the ampersand (&) appears, the formatted string displays the character. Otherwise, the formatted string displays nothing. Placeholders are filled from right to left unless there is an exclamation point (!) in the format string.                                     |
| `<`       | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/forbidden.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=1b5798b42ba2fda6004d317a8e6886a5" alt="minus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/forbidden.svg" /> | Forces lowercase. The formatted string displays all characters in lowercase format.                                                                                                                                                                                                                                                                                                                  |
| `>`       | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/forbidden.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=1b5798b42ba2fda6004d317a8e6886a5" alt="minus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/forbidden.svg" /> | Forces uppercase. The formatted string displays all characters in uppercase format.                                                                                                                                                                                                                                                                                                                  |
| !         | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/forbidden.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=1b5798b42ba2fda6004d317a8e6886a5" alt="minus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/forbidden.svg" /> | Forces left-to-right fill of placeholders. (The default is to fill placeholders from right to left.)                                                                                                                                                                                                                                                                                                 |

## Date Formats

When defining a date formatter, the format string must be enclosed by `DATE[]`
(example: `DATE[yyyy/q]`).

### Characters

The following table lists the characters that can appear in the format string for
date and time formats.

| Character |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           Supported                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| --------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| :         |                          <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/add.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=e144df45b8e2cf88dc1a402270eb6950" alt="plus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/add.svg" />                         | <p>Represents a time separator that separates hours, minutes, and seconds when time values are formatted.</p><p>The actual character used as the time separator in formatted output is determined by the system settings of the computer.</p><p>Note: In some locales, other characters may used as the time separator.</p><p>*The separator is not localized in Atoti.*</p>                                                                                                 |
| /         |                          <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/add.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=e144df45b8e2cf88dc1a402270eb6950" alt="plus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/add.svg" />                         | <p>Represents a date separator that separates the day, month, and year when date values are formatted.</p><p>The actual character used as the date separator in formatted output is determined by the system settings of the computer.</p><p>Note: In some locales, other characters may be used to represent the date separator.</p><p>*The separator is not localized in Atoti.*</p>                                                                                       |
| C         | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/forbidden.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=1b5798b42ba2fda6004d317a8e6886a5" alt="minus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/forbidden.svg" /> | <p>Displays the date as `ddddd` and displays the time as `ttttt`, in that order.</p><p>Displays only date information if there is no fractional part to the date serial number. Displays only time information if there is no integer portion.</p>                                                                                                                                                                                                                           |
| d         |                  <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/check.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=8e077caa27c8997138897bea9c36f751" alt="tick" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/check.svg" />                 | Displays the day as a number without a leading zero (1–31).                                                                                                                                                                                                                                                                                                                                                                                                                  |
| dd        |                  <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/check.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=8e077caa27c8997138897bea9c36f751" alt="tick" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/check.svg" />                 | Displays the day as a number with a leading zero (01–31).                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ddd       | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/forbidden.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=1b5798b42ba2fda6004d317a8e6886a5" alt="minus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/forbidden.svg" /> | Displays the day as an abbreviation (Sun–Sat).                                                                                                                                                                                                                                                                                                                                                                                                                               |
| dddd      | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/forbidden.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=1b5798b42ba2fda6004d317a8e6886a5" alt="minus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/forbidden.svg" /> | Displays the day as a full name (Sunday–Saturday).                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ddddd     | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/forbidden.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=1b5798b42ba2fda6004d317a8e6886a5" alt="minus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/forbidden.svg" /> | <p>Displays the date as a complete date (including day, month, and year), formatted according to your system's short date format setting.</p><p>For Microsoft Windows, the default short date format is `m/d/yy`.</p>                                                                                                                                                                                                                                                        |
| dddddd    | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/forbidden.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=1b5798b42ba2fda6004d317a8e6886a5" alt="minus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/forbidden.svg" /> | <p>Displays a date serial number as a complete date (including day, month, and year), formatted according to the long date setting recognized by the computer system.</p><p>For Windows, the default long date format is `mmmm` `dd`, `yyyy`.</p>                                                                                                                                                                                                                            |
| w         |                          <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/add.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=e144df45b8e2cf88dc1a402270eb6950" alt="plus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/add.svg" />                         | <p>Displays the day of the week as a number (1 for Sunday through 7 for Saturday).</p><p>*Displays the week of the year instead.*</p>                                                                                                                                                                                                                                                                                                                                        |
| ww        |                  <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/check.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=8e077caa27c8997138897bea9c36f751" alt="tick" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/check.svg" />                 | Displays the week of the year as a number (1–54).                                                                                                                                                                                                                                                                                                                                                                                                                            |
| m         |                          <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/add.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=e144df45b8e2cf88dc1a402270eb6950" alt="plus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/add.svg" />                         | <p>Displays the month as a number without a leading zero (1–12).</p><p>If `m` immediately follows `h` or `hh`, the minute instead of the month is displayed.</p><p>*Use uppercase `M` instead.*</p>                                                                                                                                                                                                                                                                          |
| mm        |                          <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/add.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=e144df45b8e2cf88dc1a402270eb6950" alt="plus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/add.svg" />                         | <p>Displays the month as a number with a leading zero (01–12).</p><p>If `m` immediately follows `h` or `hh`, the minute instead of the month is displayed.</p><p>*Use uppercase `MM` instead.*</p>                                                                                                                                                                                                                                                                           |
| mmm       |                          <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/add.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=e144df45b8e2cf88dc1a402270eb6950" alt="plus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/add.svg" />                         | <p>Displays the month as an abbreviation (Jan–Dec).</p><p>*Use uppercase `MMM` instead.*</p>                                                                                                                                                                                                                                                                                                                                                                                 |
| mmmm      |                          <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/add.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=e144df45b8e2cf88dc1a402270eb6950" alt="plus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/add.svg" />                         | <p>Displays the month as a full month name (January–December).</p><p>*Use uppercase `MMMM` instead.*</p>                                                                                                                                                                                                                                                                                                                                                                     |
| q         |                  <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/check.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=8e077caa27c8997138897bea9c36f751" alt="tick" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/check.svg" />                 | Displays the quarter of the year as a number (1–4).                                                                                                                                                                                                                                                                                                                                                                                                                          |
| y         |                  <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/check.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=8e077caa27c8997138897bea9c36f751" alt="tick" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/check.svg" />                 | Displays the day of the year as a number (1–366).                                                                                                                                                                                                                                                                                                                                                                                                                            |
| yy        |                  <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/check.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=8e077caa27c8997138897bea9c36f751" alt="tick" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/check.svg" />                 | Displays the year as a two-digit number (00–99).                                                                                                                                                                                                                                                                                                                                                                                                                             |
| yyyy      |                  <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/check.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=8e077caa27c8997138897bea9c36f751" alt="tick" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/check.svg" />                 | Displays the year as a four-digit number (100–9999).                                                                                                                                                                                                                                                                                                                                                                                                                         |
| h         |                  <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/check.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=8e077caa27c8997138897bea9c36f751" alt="tick" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/check.svg" />                 | Displays the hour as a number without leading zeros (0–23).                                                                                                                                                                                                                                                                                                                                                                                                                  |
| hh        |                  <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/check.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=8e077caa27c8997138897bea9c36f751" alt="tick" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/check.svg" />                 | Displays the hour as a number with leading zeros (00–23).                                                                                                                                                                                                                                                                                                                                                                                                                    |
| n         |                          <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/add.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=e144df45b8e2cf88dc1a402270eb6950" alt="plus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/add.svg" />                         | <p>Displays the minute as a number without leading zeros (0–59).</p><p>*Use `m` instead.*</p>                                                                                                                                                                                                                                                                                                                                                                                |
| nn        |                          <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/add.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=e144df45b8e2cf88dc1a402270eb6950" alt="plus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/add.svg" />                         | <p>Displays the minute as a number with leading zeros (00–59).</p><p>*Use `mm` instead.*</p>                                                                                                                                                                                                                                                                                                                                                                                 |
| s         |                  <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/check.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=8e077caa27c8997138897bea9c36f751" alt="tick" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/check.svg" />                 | Displays the second as a number without leading zeros (0–59).                                                                                                                                                                                                                                                                                                                                                                                                                |
| ss        |                  <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/check.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=8e077caa27c8997138897bea9c36f751" alt="tick" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/check.svg" />                 | Displays the second as a number with leading zeros (00–59).                                                                                                                                                                                                                                                                                                                                                                                                                  |
| t t t t t | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/forbidden.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=1b5798b42ba2fda6004d317a8e6886a5" alt="minus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/forbidden.svg" /> | <p>Displays a time as a complete time (including hour, minute, and second), formatted using the time separator defined by the time format recognized by the computer system.</p><p>A leading zero is displayed if the leading zero option is selected, and the time is earlier than 10:00 in either the A.M. or the P.M. cycle. For example, 09:59.</p><p>For Windows, the default time format is `h:mm:ss`.</p>                                                             |
| AM/PM     | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/forbidden.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=1b5798b42ba2fda6004d317a8e6886a5" alt="minus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/forbidden.svg" /> | <p>Displays an uppercase `AM` with any hour from midnight until noon; displays an uppercase `PM` with any hour from noon until midnight.</p><p>Note: Uses the 12-hour clock.</p>                                                                                                                                                                                                                                                                                             |
| am/pm     | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/forbidden.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=1b5798b42ba2fda6004d317a8e6886a5" alt="minus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/forbidden.svg" /> | <p>Displays a lowercase `am` with any hour from midnight until noon; displays a lowercase `pm` with any hour from noon until midnight.</p><p>Note: Uses the 12-hour clock.</p>                                                                                                                                                                                                                                                                                               |
| A/P       | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/forbidden.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=1b5798b42ba2fda6004d317a8e6886a5" alt="minus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/forbidden.svg" /> | <p>Displays an uppercase `A` with any hour from midnight until noon; displays an uppercase `P` with any hour from noon until midnight.</p><p>Note: Uses the 12-hour clock.</p>                                                                                                                                                                                                                                                                                               |
| a/p       | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/forbidden.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=1b5798b42ba2fda6004d317a8e6886a5" alt="minus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/forbidden.svg" /> | <p>Displays a lowercase `a` with any hour from midnight until noon; displays a lowercase `p` with any hour from noon until midnight.</p><p>Note: Uses the 12-hour clock.</p>                                                                                                                                                                                                                                                                                                 |
| AMPM      | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/forbidden.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=1b5798b42ba2fda6004d317a8e6886a5" alt="minus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/forbidden.svg" /> | <p>Displays the AM string literal as defined by the computer system with any hour from midnight until noon; displays the PM string literal as defined by the computer system with any hour from noon until midnight.</p><p>`AMPM` can be either uppercase or lowercase, but the case of the string displayed matches the string as defined by the system settings of the computer.</p><p>For Windows, the default format is `AM/PM`.</p><p>Note: Uses the 12-hour clock.</p> |

### Named Date Formats

The following table lists the predefined date and time format names:

| Format name               |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           Supported                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | Description                                                                                                                                                                                                                                                                                                                       |
| ------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <code>General Date</code> | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/forbidden.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=1b5798b42ba2fda6004d317a8e6886a5" alt="minus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/forbidden.svg" /> | Displays a date and/or time. For real numbers, displays a date and time, for example, 4/3/93 05:34 PM. If there is no fractional part, displays only a date, for example, 4/3/93. If there is no integer part, displays a time only, for example, 05:34 PM. The format of the date display is determined by your system settings. |
| <code>Long Date</code>    | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/forbidden.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=1b5798b42ba2fda6004d317a8e6886a5" alt="minus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/forbidden.svg" /> | Displays a date according to your system's long date format.                                                                                                                                                                                                                                                                      |
| <code>Medium Date</code>  | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/forbidden.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=1b5798b42ba2fda6004d317a8e6886a5" alt="minus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/forbidden.svg" /> | Displays a date using the medium date format appropriate for the language version of the host application.                                                                                                                                                                                                                        |
| <code>Short Date</code>   | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/forbidden.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=1b5798b42ba2fda6004d317a8e6886a5" alt="minus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/forbidden.svg" /> | Displays a date using your system's short date format.                                                                                                                                                                                                                                                                            |
| <code>Long Time</code>    | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/forbidden.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=1b5798b42ba2fda6004d317a8e6886a5" alt="minus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/forbidden.svg" /> | Displays a time using your system's long time format; includes hours, minutes, and seconds.                                                                                                                                                                                                                                       |
| <code>Medium Time</code>  | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/forbidden.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=1b5798b42ba2fda6004d317a8e6886a5" alt="minus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/forbidden.svg" /> | Displays a time in the 12-hour format using hours and minutes and the AM/PM designator.                                                                                                                                                                                                                                           |
| <code>Short Time</code>   | <img src="https://mintcdn.com/activeviam/KszPZqdDnmT6EpJc/engine/java-sdk/6.1/assets/mdx/forbidden.svg?fit=max&auto=format&n=KszPZqdDnmT6EpJc&q=85&s=1b5798b42ba2fda6004d317a8e6886a5" alt="minus" width="16" height="16" data-path="engine/java-sdk/6.1/assets/mdx/forbidden.svg" /> | Displays a time using the 24-hour format, for example, 17:45.                                                                                                                                                                                                                                                                     |

### Note about Usable Formats

Internally, a [java.text.SimpleDateFormat](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/text/SimpleDateFormat.html)
is used, so its formatting syntax **must** be used instead of the standard MDX syntax.

Using a format string that is incompatible with `SimpleDateFormat`'s expected syntax will
result in an exception in Atoti.

> Example: `DATE[yyyy/MM/dd]` must be used to format dates as `year/month/day`, even
> though months should be designated with a lowercase `mm` according to the MDX formatting
> standard.

## Array Formats

When defining an array formatter, the format string must be enclosed by `ARRAY[]`
(example: `ARRAY['|';:10;DOUBLE[#.#]]`).

### Sections

A user-defined format expression for arrays can have anywhere from zero to three sections,
separated by semicolons.

* No section: the default separator is the comma, all the elements are displayed based on their toString method.
* One section: the section defines the separator between the elements surrounded by single quotes, e.g. '|' or ' - '.
* Two sections: the first section is for the separator, the second for the slice of elements to be displayed.
  The slice can be a single element, e.g `10`, the first 5 elements `:5`, the elements starting from the 5th `5:`, or a range `5:10`.
  If not specified, the default is `:` which means all the elements.
* Three sections: the first section is for the separator, the second for the slice of elements to be displayed, and the third for the
  formatter of each element. It could be `DATE[yyyy/MM/dd]` for an array of dates, or `DOUBLE[#.#]` for an array of doubles, or even a custom formatter.

## Custom Formatters

Custom formatters can be added to Atoti by implementing the `IFormatter` interface.
They can be useful to format Java objects that do not have formatting support by default
in Atoti, or to accept a different syntax than the one specified by the MDX
standard.

If the custom formatter needs to be configured with a pattern string, it should implement
`IPatternFormatter` rather than `IFormatter`. Similarly, the formatter can be provided
the current `Locale` if it extends `ALocalizable`.

In this case, the formatter should have a constructor with signature
`Constructor([Locale], [String])`, depending on whether it extends `ALocalizable` and/or
`IFormatter`.

Once registered as a plugin value in the registry, the custom formatter can be used by
specifying its plugin key while defining a formatter (example: `PLUGIN_KEY` or
`PLUGIN_KEY[pattern]`, for a custom formatter whose plugin key is `PLUGIN_KEY`).

## Examples

Here are some examples of common format strings:

| Format String            |                         Value | Formatted Value |
| ------------------------ | ----------------------------: | --------------: |
| `DOUBLE[#.#]`            |                     `1.23456` |           `1.2` |
|                          |                    `-1.23456` |          `-1.2` |
|                          |                           `0` |             `0` |
| `DOUBLE[#.00%]`          |                     `1.23456` |       `123.46%` |
|                          |                    `-1.23456` |      `-123.46%` |
|                          |                           `0` |         `0.00%` |
| `DOUBLE[+#.#;-#.#]`      |                    `1.23456 ` |          `+1.2` |
|                          |                    `-1.23456` |          `-1.2` |
|                          |                           `0` |            `+0` |
| `DOUBLE[+#.#;-#.#;0]`    |                     `1.23456` |          `+1.2` |
|                          |                    `-1.23456` |          `-1.2` |
|                          |                           `0` |             `0` |
| `DOUBLE[#,,\M]`          |                 `12,345,678 ` |           `12M` |
|                          |                 `-12,345,678` |          `-12M` |
|                          |                           `0` |            `0M` |
| `DATE[yyyy/MM/dd]`       | `year=2020; day=31; month=12` |    `2020/12/31` |
| `DATE['Q'q]`             | `year=2020; day=31; month=12` |            `Q4` |
| `ARRAY[';';:3]`          |   `[1.0, 2.0, 3.0, 4.0, 5.0]` |   `1.0;2.0;3.0` |
| `ARRAY[;1;DOUBLE[#.00]]` |   `[1.0, 2.0, 3.0, 4.0, 5.0]` |          `2.00` |
