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

# Dates (dw::core::Dates)

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

This module contains functions for creating and manipulating dates.

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

_Introduced in DataWeave version 2.4.0._

## 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-dates-functions-atbeginningofday">atBeginningOfDay</a></p></td><td><div><div><p>Returns a new <code>DateTime</code> value that changes the <code>Time</code> value in the input to the beginning of the specified <em>day</em>.</p></div></div></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.4/dw-dates-functions-atbeginningofhour">atBeginningOfHour</a></p></td><td><div><div><p>Returns a new <code>DateTime</code> value that changes the <code>Time</code> value in the input to the beginning of the specified <em>hour</em>.</p></div></div></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.4/dw-dates-functions-atbeginningofmonth">atBeginningOfMonth</a></p></td><td><div><div><p>Returns a new <code>DateTime</code> value that changes the <code>Day</code> value from the input to the first day of the specified <em>month</em>. It also sets the <code>Time</code> value to <code>00:00:00</code>.</p></div></div></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.4/dw-dates-functions-atbeginningofweek">atBeginningOfWeek</a></p></td><td><div><div><p>Returns a new <code>DateTime</code> value that changes the <code>Day</code> and <code>Time</code> values from the input to the beginning of the first day of the specified <em>week</em>.</p></div></div></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.4/dw-dates-functions-atbeginningofyear">atBeginningOfYear</a></p></td><td><div><div><p>Takes a <code>DateTime</code> value as input and returns a <code>DateTime</code> value for the first day of the <em>year</em> specified in the input. It also sets the <code>Time</code> value to <code>00:00:00</code>.</p></div></div></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.4/dw-dates-functions-date">date</a></p></td><td><div><div><p>Creates a <code>Date</code> value from values specified for <code>year</code>, <code>month</code>, and <code>day</code> fields.</p></div></div></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.4/dw-dates-functions-datetime">dateTime</a></p></td><td><div><div><p>Creates a <code>DateTime</code> value from values specified for <code>year</code>, <code>month</code>, <code>day</code>, <code>hour</code>, <code>minutes</code>, <code>seconds</code>, and <code>timezone</code> fields.</p></div></div></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.4/dw-dates-functions-localdatetime">localDateTime</a></p></td><td><div><div><p>Creates a <code>LocalDateTime</code> value from values specified for <code>year</code>, <code>month</code>, <code>day</code>, <code>hour</code>, <code>minutes</code>, and <code>seconds</code> fields.</p></div></div></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.4/dw-dates-functions-localtime">localTime</a></p></td><td><div><div><p>Creates a <code>LocalTime</code> value from values specified for <code>hour</code>, <code>minutes</code>, and <code>seconds</code> fields.</p></div></div></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.4/dw-dates-functions-time">time</a></p></td><td><div><div><p>Creates a <code>Time</code> value from values specified for <code>hour</code>, <code>minutes</code>, <code>seconds</code>, and <code>timezone</code> fields.</p></div></div></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.4/dw-dates-functions-today">today</a></p></td><td><div><div><p>Returns the date for today as a <code>Date</code> type.</p></div></div></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.4/dw-dates-functions-tomorrow">tomorrow</a></p></td><td><div><div><p>Returns the date for tomorrow as a <code>Date</code> type.</p></div></div></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.4/dw-dates-functions-yesterday">yesterday</a></p></td><td><div><div><p>Returns the date for yesterday as a <code>Date</code> type.</p></div></div></td></tr></tbody></table>

## Types

- [Dates Types](https://docs.mulesoft.com/dataweave/2.4/dw-dates-types)
