# Date Time Where Conditions For API's

**URL:** <https://community.nocodb.com/t/date-time-where-conditions-for-apis/1870>\
**Category:** APIs\
**Created:** [May 13, 2025, 11:36am UTC](https://community.nocodb.com/t/date-time-where-conditions-for-apis/1870 "2025-05-13T11:36:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![eyyupsert](https://avatars.discourse-cdn.com/v4/letter/e/41988e/32.png) [@eyyupsert](https://community.nocodb.com/u/eyyupsert)\
**Post date:** [May 13, 2025, 11:36am UTC](https://community.nocodb.com/t/date-time-where-conditions-for-apis/1870/1 "2025-05-13T11:36:09Z")

</div>

The current date is 13.05-2025 14:13.00. I want to filter by a column that is between two date times and I am using activepieces. How can I find that a column with the CreatedAtCustom field name of 12.05-2025 14:13.00 and 13.05-2025 14:13.00 is within this date range?

---

<div class="post-metadata">

**Author:** ![mertmit](https://avatars.discourse-cdn.com/v4/letter/m/dc4da7/32.png) [@mertmit](https://community.nocodb.com/u/mertmit)\
**Post date:** [May 13, 2025, 11:52am UTC](https://community.nocodb.com/t/date-time-where-conditions-for-apis/1870/2 "2025-05-13T11:52:41Z")

</div>

Hi @eyyupsert

To filter records by a column with a date-time range, use our where query param in your API query.

For exact date filtering you can use lt / gt with date range:

```http
GET /api/v2/tables/{tableId}/records?where=(CreatedAtCustom,lt,exactDate,2025-05-14 14:00)~and(CreatedAtCustom,gt,exactDate,2025-05-12 14:00)

```

For dynamic filtering like today - tomorrow etc. you can do something like following:

```auto
GET /api/v2/tables/{tableId}/records?where=(CreatedAtCustom,eq,today)~or(CreatedAtCustom,eq,tomorrow)

```

For more details see the [NocoDB REST API Overview](https://docs.nocodb.com/developer-resources/rest-APIs/overview)

---

<div class="post-metadata">

**Author:** ![eyyupsert](https://avatars.discourse-cdn.com/v4/letter/e/41988e/32.png) [@eyyupsert](https://community.nocodb.com/u/eyyupsert)\
**Post date:** [May 13, 2025, 12:09pm UTC](https://community.nocodb.com/t/date-time-where-conditions-for-apis/1870/3 "2025-05-13T12:09:48Z")

</div>

Thanks man. It worked.
