---
category: [Administration & Integrations, Platform and Product Extensions, Platform and Product Extensions/Integration, Administration & Integrations/Custom Integrations & Apps, Platform and Product Extensions/Workday Extend]
keyword: [Extend, PMD Scripting, Scripts]
nav: wcp_docs
parent_url: /wcp_docs/
title: format (number, formatString)
layout: subsection
---

## <a id="section_m3p_myb_5db"></a>Description

Returns a number representation of the given number in the given format.

## <a id="section_cyq_j1m_zsb"></a>Return Type

`Integer` or `Decimal`, depending on the requested format.

## <a id="section_dz5_pwg_5db"></a>Namespace Function Syntax

```
number:format(number, formatString)
```

<table><thead><tr><th>Parameter</th><th>Description</th></tr></thead><tbody><tr><td>number</td><td>The number to format.</td></tr><tr><td>formatString</td><td>A number format string. For valid date formats, see the Java documentation for <code>java.text.DecimalFormat</code>.</td></tr></tbody></table><br/>

<b>Example</b>

`number:format(0.12, '#%')`

Returns `12%`

`number:format(0.1234, '#.000%')`

Returns `12.340%`

`number:format(-1234.567, '#,###.00;(#,###.00)')`

Returns `(1,234.57)`

