# Using BETWEEN operator

**URL:** <https://community.hubspot.com/t/using-between-operator/55113>\
**Category:** APIs & Integrations\
**Tags:** developer-tools, object\
**Created:** [April 17, 2022, 1:04pm UTC](https://community.hubspot.com/t/using-between-operator/55113 "2022-04-17T13:04:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TSDev](https://avatars.discourse-cdn.com/v4/letter/t/c0e974/32.png) [@TSDev](https://community.hubspot.com/u/TSDev)\
**Post date:** [April 17, 2022, 1:04pm UTC](https://community.hubspot.com/t/using-between-operator/55113/1 "2022-04-17T13:04:07Z")

</div>

Hi,

I’d like to use date range to search deals by the field closedate.

I’ve read the [API docs](https://developers.hubspot.com/docs/api/crm/search#filter-search-results) that there is BETWEEN operator but I didn’t found an example how to use it.

Could you please share an example how to use BETWEEN operator with SEARCH function.

Using two conditions LE and GE doesn’t work for me because it requires two of three available filters which I’d like to use to filter out by other fields

thanks in advance.

Slava

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [April 18, 2022, 8:12am UTC](https://community.hubspot.com/t/using-between-operator/55113/2 "2022-04-18T08:12:19Z")

</div>

hi @TSDev

You can use it like this

 ![Screenshot_1.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/c/1/c1a3535f8101e5f7912c228b497a6966eac2d22d.png)

Hope this helps!

If we were able to answer your query, kindly help the community by marking it as a solution.  
Thanks and Regards.

---

<div class="post-metadata">

**Author:** ![TSDev](https://avatars.discourse-cdn.com/v4/letter/t/c0e974/32.png) [@TSDev](https://community.hubspot.com/u/TSDev)\
**Post date:** [April 18, 2022, 5:51pm UTC](https://community.hubspot.com/t/using-between-operator/55113/3 "2022-04-18T17:51:33Z")

</div>

Thank you

---

<div class="post-metadata">

**Author:** ![TSDev](https://avatars.discourse-cdn.com/v4/letter/t/c0e974/32.png) [@TSDev](https://community.hubspot.com/u/TSDev)\
**Post date:** [May 17, 2022, 3:23pm UTC](https://community.hubspot.com/t/using-between-operator/55113/4 "2022-05-17T15:23:07Z")

</div>

Hi [@ChehakWadhdwa](https://community.hubspot.com/t5/user/viewprofilepage/user-id/345416) , thanks for your reply. Now it works differently. I have checked it out and that construction works

 ![TSDev_0-1652800943221.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/f/fa1e455a5180aba7b5241530b63d10a258bee5b9.png)

Will keep the solution here for others.

I see that API documentation has been updated and improved as well.
