---
schema_version: "1"
id: a559338c00063f6113caf5c0ac5e3db87cb7570652ad415e01e745dae668c453
title: minutes
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.9/dw-periods-functions-minutes.md
canonical_url: https://docs.mulesoft.com/dataweave/2.9/dw-periods-functions-minutes
source_site: docs.mulesoft.com
content_type: documentation
content_hash: b1280f6abee1b2bcc18514533826498741d7b51310a6dda16c596d948052301a
description: MuleSoft Documentation Site
release: "2.9"
latest: false
---
---
product: DataWeave
version: 2.9
---

# minutes

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

## minutes(nMinutes: Number): Period

Creates a Period value from the provided number of minutes.

The function applies the `duration` function to the input value.

_Introduced in DataWeave version 2.4.0._

### Parameters

<table><colgroup><col> <col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><p><code>nMinutes</code></p></td><td><p>The number of minutes as a whole or decimal number. A positive or negative number is valid.</p></td></tr></tbody></table>

### Example

This example shows how `minutes` behaves with different inputs. It adds and subtracts hours from
DateTime values. It also converts the decimal value `4.555` into the Period format (`PT4M33.3S`) and
and the whole number `4` into the Period format (`PT4M`). Notice that `minutes(-1) + minutes(2)`
returns the number of seconds.

#### Source

```DataWeave
%dw 2.0
import * from dw::core::Periods
output application/json
---
{
   nextMinute: |2020-10-05T20:22:34.385Z| + minutes(1),
   previousMinute: |2020-10-05T20:22:34.385Z| - minutes(1),
   decimalInputPeriod: minutes(4.555),
   wholeNumberInputPeriod: minutes(4),
   addNegativeValue: minutes(-1) + minutes(2)
}
```

#### Output

```Json
{
   "nextMinute": "2020-10-05T20:23:34.385Z",
   "previousMinute": "2020-10-05T20:21:34.385Z",
   "decimalInputPeriod": "PT4M33.3S",
   "wholeNumberInputPeriod": "PT4M",
   "addNegativeValue": 60
}
```
