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

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