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

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