---
schema_version: "1"
id: 4a8379e5ac3ddfea17e2d741a64d8223c2c1795b8ff15b89b0c9306d478a484a
title: Periods (dw::core::Periods)
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.6/dw-periods.md
canonical_url: https://docs.mulesoft.com/dataweave/2.6/dw-periods
source_site: docs.mulesoft.com
content_type: documentation
content_hash: c60b0ad2ddb228a4dbe95f55006f253e88001f3473dc03a5e00f887515373b39
description: MuleSoft Documentation Site
release: "2.6"
latest: false
---
---
product: DataWeave
version: 2.6
---

# Periods (dw::core::Periods)

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

This module contains functions for working with and creating Period values.

To use this module, you must import it to your DataWeave code, for example, by adding the line
`import * from dw::core::Periods` to the header of your DataWeave script.

## Functions

<table><colgroup><col> <col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.6/dw-periods-functions-between">between</a></p></td><td><p>Returns a Period (P) value consisting of the number of years, months, and days between two Date values.</p></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.6/dw-periods-functions-days">days</a></p></td><td><p>Creates a Period value from the provided number of days.</p></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.6/dw-periods-functions-duration">duration</a></p></td><td><p>Creates a Period value that represents a number of days, hours, minutes, or seconds.</p></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.6/dw-periods-functions-hours">hours</a></p></td><td><p>Creates a Period value from the provided number of hours.</p></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.6/dw-periods-functions-minutes">minutes</a></p></td><td><p>Creates a Period value from the provided number of minutes.</p></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.6/dw-periods-functions-months">months</a></p></td><td><p>Creates a Period value from the provided number of months.</p></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.6/dw-periods-functions-period">period</a></p></td><td><p>Creates a Period value as a date-based number of years, months, and days in the ISO-8601 calendar system.</p></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.6/dw-periods-functions-seconds">seconds</a></p></td><td><p>Creates a Period value from the provided number of seconds.</p></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.6/dw-periods-functions-years">years</a></p></td><td><p>Creates a Period value from the provided number of years.</p></td></tr></tbody></table>
