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

# 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"
```
