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

# 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.6/dw-dates-functions-atbeginningofday">atBeginningOfDay</a></p></td><td><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></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.6/dw-dates-functions-atbeginningofhour">atBeginningOfHour</a></p></td><td><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></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.6/dw-dates-functions-atbeginningofmonth">atBeginningOfMonth</a></p></td><td><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></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.6/dw-dates-functions-atbeginningofweek">atBeginningOfWeek</a></p></td><td><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></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.6/dw-dates-functions-atbeginningofyear">atBeginningOfYear</a></p></td><td><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></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.6/dw-dates-functions-date">date</a></p></td><td><p>Creates a <code>Date</code> value from values specified for <code>year</code>, <code>month</code>, and <code>day</code> fields.</p></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.6/dw-dates-functions-datetime">dateTime</a></p></td><td><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></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.6/dw-dates-functions-localdatetime">localDateTime</a></p></td><td><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></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.6/dw-dates-functions-localtime">localTime</a></p></td><td><p>Creates a <code>LocalTime</code> value from values specified for <code>hour</code>, <code>minutes</code>, and <code>seconds</code> fields.</p></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.6/dw-dates-functions-time">time</a></p></td><td><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></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.6/dw-dates-functions-today">today</a></p></td><td><p>Returns the date for today as a <code>Date</code> type.</p></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.6/dw-dates-functions-tomorrow">tomorrow</a></p></td><td><p>Returns the date for tomorrow as a <code>Date</code> type.</p></td></tr><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.6/dw-dates-functions-yesterday">yesterday</a></p></td><td><p>Returns the date for yesterday as a <code>Date</code> type.</p></td></tr></tbody></table>

## Types

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