---
schema_version: "1"
id: 53ff39946bd891a00303307a3e16534752ca5d095fc852b66580de8fa8c2fa8b
title: yesterday
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.6/dw-dates-functions-yesterday.md
canonical_url: https://docs.mulesoft.com/dataweave/2.6/dw-dates-functions-yesterday
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 3295ac484f98d03886478222b38aa2630672eb4e473872af8103edaba1f25aea
description: MuleSoft Documentation Site
release: "2.6"
latest: false
---
---
product: DataWeave
version: 2.6
---

# yesterday

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

## yesterday(): Date

Returns the date for yesterday as a `Date` type.

_Introduced in DataWeave version 2.4.0._

### Example

This example shows the output of `yesterday` function.

#### Source

```DataWeave
%dw 2.0
import * from dw::core::Dates
output application/json
---
yesterday()
```

#### Output

```Json
"2021-05-14"
```
