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

# 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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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.4/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>
