---
schema_version: "1"
id: cc40cfec5fa9034b4b3b4e3f47b884319473be1158cb8dcee0df84a3e9c3c141
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.12/dw-coercions-types.md
canonical_url: https://docs.mulesoft.com/dataweave/2.12/dw-coercions-types
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 91e8240c1275702bd7ea1e644cb91c71f2171ebe84dc9255cad252c2d23ea1b3
description: MuleSoft Documentation Site
release: "2.12"
latest: false
---
---
product: DataWeave
version: 2.12
---

# 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>
