# format and formatWithLocale in Jira Automation: examples

URL: https://goingstellar.ro/reference/smart-values/number-format/

format prints a number with US thousands separators, format(pattern) applies a Java style pattern, and formatWithLocale uses the separators of a locale such as fr_FR or de_DE. Use them when a number goes into a comment, an email or a Slack message that people read.

## Syntax

```
{{number.format}}
{{number.format("pattern")}}
{{number.formatWithLocale("fr_FR")}}
```

## Arguments

- `pattern` (required: no): A Java number pattern such as ### or #,##0.00
- `locale` (required: no): A locale code with an underscore, such as fr_FR or de_DE

## Works on

- Numbers: number fields and calculated numbers
- Returns: text

## Examples

```
{{issue.summary.length().multiply(100000).format}}
```

Add thousands separators to a large number (12 characters times 100000).

Result:

```
1,200,000
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.summary.length().multiply(100000).format("###")}}
```

The pattern ### prints the digits without separators.

Result:

```
1200000
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.summary.length().multiply(100000).format("#,##0.00")}}
```

Show two decimals and separators, as in an amount.

Result:

```
1,200,000.00
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.summary.length().multiply(100000).formatWithLocale("fr_FR")}}
```

French formatting uses spaces between the thousands.

Result:

```
1 200 000
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.summary.length().multiply(100000).formatWithLocale("de_DE")}}
```

German formatting uses dots.

Result:

```
1.200.000
```

Run on Jira Cloud on 29 Nov 2026.

## Pitfalls

- With fr_FR the thousands separator is a narrow no-break space (U+202F), not a normal space, so the result does not match a text comparison against a typed space (checked on Jira Cloud, November 2026).
- Locale codes are written with an underscore, as in fr_FR and de_DE.
- On a field without a value the format functions print an empty string, as the doc examples `issue.Invoice Amount.format` do on a site without that field.

## Related

- [asPercentage and asCurrency](https://goingstellar.ro/reference/smart-values/aspercentage-ascurrency/)
- [{{#=}} math expressions](https://goingstellar.ro/reference/smart-values/math-expressions/)
- [locale() and withLocale()](https://goingstellar.ro/reference/smart-values/date-locale/)
- [Date formats (jiraDate, format(), shortTime…)](https://goingstellar.ro/reference/smart-values/date-format/)

## Sources

- [Jira smart values: math expressions (Atlassian Support)](https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/)

