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

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