---
title: boundaries.yesterday() function
description: boundaries.yesterday() returns a record with start and stop boundary timestamps for yesterday.
url: https://docs.influxdata.com/flux/v0/stdlib/date/boundaries/yesterday/
estimated_tokens: 243
product: Flux
version: v0
publisher: InfluxData
canonical: https://docs.influxdata.com/flux/v0/stdlib/date/boundaries/yesterday/
date: '2024-04-08T16:01:02-06:00'
lastmod: '2024-04-08T16:01:02-06:00'
---

* Flux 0.172.0 – 0.177.1

InfluxDB support

`boundaries.yesterday()` returns a record with `start` and `stop` boundary timestamps for yesterday.

Yesterday is relative to `now()`.

##### Function type signature

```js
() => {stop: time, start: time}
```

For more information, see [Function type signatures](/flux/v0/function-type-signatures/).

## Examples

* [Return start and stop timestamps of yesterday](#return-start-and-stop-timestamps-of-yesterday)
* [Query data from yesterday](#query-data-from-yesterday)

### Return start and stop timestamps of yesterday

```
import "date/boundaries"

option now = () => 2022-01-02T13:45:28Z

boundaries.yesterday(

)// Returns {start: 2022-01-01T00:00:00.000000000Z, stop: 2022-01-02T00:00:00.000000000Z}

```

### Query data from yesterday

```js
import "date/boundaries"

day = boundaries.yesterday()

from(bucket: "example-bucket")
    |> range(start: day.start, stop: day.stop)
```

[date/time](/flux/v0/tags/date/time/)
