---
schema_version: "1"
id: 93dcd4d9770ba2ca54ea2ef7ebff6085cbd7464da738adad9259a9e0a629c018
title: Coercions Types (dw::util::Coercions)
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.9/dw-coercions-types.md
canonical_url: https://docs.mulesoft.com/dataweave/2.9/dw-coercions-types
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 81d97a7ba1eef45c1b0784b98f2de4ad646415348f819dc9423602a814e2d013
description: MuleSoft Documentation Site
release: "2.9"
latest: false
---
---
product: DataWeave
version: 2.9
---

# Coercions Types (dw::util::Coercions)

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Type</th><th>Definition</th><th>Description</th></tr></thead><tbody><tr><td><p>Formatter</p></td><td><div><div><p><code>type Formatter = { format?: String, locale?: String }</code></p></div></div></td><td><div><div><p>Type used for formatting <code>Dates</code> types and <code>Number</code>. Supports the following fields:</p></div><div><ul><li><p><code>format</code>: (optional) The ISO-8601 formatting to use on the date or time. For example, this parameter accepts character patterns based on the Java 8 <code>java.time.format</code>. A <code>null</code> value has no effect on the value.</p></li><li><p><code>locale</code>: (optional) ISO 3166 country code to use, such as <code>US</code>, <code>AR</code>, or <code>ES</code>. A <code>null</code> or absent value uses your JVM default. When you pass a translatable format, such as <code>eeee</code> and <code>MMMM</code>, a <code>locale</code> (such as <code>ES</code>) transforms the corresponding numeric values to a localized string.</p></li></ul></div></div></td></tr><tr><td><p>MillisOrSecs</p></td><td><div><div><p><code>type MillisOrSecs = "milliseconds" | "seconds"</code></p></div></div></td><td><div><div><p>Type used for setting units to <code>"milliseconds"</code> or <code>"seconds"</code>.</p></div></div></td></tr><tr><td><p>PeriodUnits</p></td><td><div><div><p><code>type PeriodUnits = "hours" | "minutes" | "seconds" | "milliseconds" | "nanos"</code></p></div></div></td><td><div><div><p>Type used for setting units of a <code>Period</code> value to <code>"hours"</code>, <code>"minutes"</code>, <code>"seconds"</code>, <code>"milliseconds"</code>, or <code>"nanos"</code>.</p></div></div></td></tr><tr><td><p>RoundingMode</p></td><td><div><div><p><code>type RoundingMode = "UP" | "DOWN" | "CEILING" | "FLOOR" | "HALF_UP" | "HALF_DOWN" | "HALF_EVEN"</code></p></div></div></td><td><div><div><p>Type used when rounding decimal values up or down.</p></div></div></td></tr></tbody></table>
