# API question about using "yesterday" date format

**URL:** https://community.beestat.io/t/api-question-about-using-yesterday-date-format/977
**Category:** Feedback & Discussion
**Created:** [November 14, 2023, 7:55pm UTC](https://community.beestat.io/t/api-question-about-using-yesterday-date-format/977 "2023-11-14T19:55:53Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![bgardner](https://community.beestat.io/letter_avatar_proxy/v4/letter/b/e0b2c6/32.png) [@bgardner](https://community.beestat.io/u/bgardner)
#### Post date: [November 14, 2023, 7:55pm UTC](https://community.beestat.io/t/api-question-about-using-yesterday-date-format/977/1 "2023-11-14T19:55:53Z")

</div>

I am new to Beestat but excited to use the API. I would like to use runtime\_thermostat\_summary.read\_id to get yesterday’s summary. The documentation states that it accepts string formats. I wondered if it supports “yesterday”? If so can someone help me with the correct API call format? I tried several variations but none of them seemed to work.

Is there a better way to do this?

Thanks,

Bob

---

<div class="post-metadata">

### Author: ![ziebelje](https://community.beestat.io/user_avatar/community.beestat.io/ziebelje/32/633_2.png) [@ziebelje](https://community.beestat.io/u/ziebelje)
#### Post date: [November 15, 2023, 1:06pm UTC](https://community.beestat.io/t/api-question-about-using-yesterday-date-format/977/2 "2023-11-15T13:06:33Z")

</div>

That API call would look like this. Replace the **api\_key** and **thermostat\_id** with your own. Using the value of “yesterday” on November 15 would translate to 2023-11-14 and should work without issue.

`https://api.beestat.io/?api_key={YOUR API KEY}&resource=runtime_thermostat_summary&method=read_id&arguments={"attributes":{"thermostat_id":{YOUR THERMOSTAT ID},"date":"yesterday"}}`

If you’re not sure of your **thermostat\_id** , you can get it by doing this call:

`https://api.beestat.io/?api_key={YOUR API KEY}&resource=thermostat&method=read_id`

---

<div class="post-metadata">

### Author: ![bgardner](https://community.beestat.io/letter_avatar_proxy/v4/letter/b/e0b2c6/32.png) [@bgardner](https://community.beestat.io/u/bgardner)
#### Post date: [November 15, 2023, 5:48pm UTC](https://community.beestat.io/t/api-question-about-using-yesterday-date-format/977/3 "2023-11-15T17:48:30Z")

</div>

Thanks Jon. That worked perfectly.

Bob
