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

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